* Shut off hostname resolution when dealing with Unix domain sockets
[citadel.git] / citadel / sysdep.c
index 42feb6650ab7bdf4ef6c4b97645b84605fe88f3c..b258c03b2628272def49c3b99ed5d5347886e1e6 100644 (file)
@@ -1044,7 +1044,7 @@ SETUP_FD: memcpy(&readfds, &masterfds, sizeof(fd_set) );
                }
 
                /* Next, check to see if it's a new client connecting
-                * on the master socket.
+                * on a master socket.
                 */
                else for (serviceptr = ServiceHookTable; serviceptr != NULL;
                     serviceptr = serviceptr->next ) {
@@ -1071,6 +1071,10 @@ SETUP_FD:        memcpy(&readfds, &masterfds, sizeof(fd_set) );
                                        con->client_socket = ssock;
                                        con->h_command_function =
                                                serviceptr->h_command_function;
+
+                                       /* Determine whether local socket */
+                                       if (serviceptr->sockpath != NULL)
+                                               con->is_local_socket = 1;
        
                                        /* Set the SO_REUSEADDR socket option */
                                        i = 1;