]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.c
More debugging
[citadel.git] / citadel / context.c
index 0b545139b0998a7a32e7dba2c0807ae0f30b5be8..1bdea382923e744c2e4f5d233c87f40356dc8573 100644 (file)
@@ -334,8 +334,7 @@ void RemoveContext (CitContext *con)
 {
        const char *c;
        if (con==NULL) {
-               syslog(LOG_ERR,
-                       "WARNING: RemoveContext() called with NULL!\n");
+               syslog(LOG_ERR, "WARNING: RemoveContext() called with NULL!\n");
                return;
        }
        c = con->ServiceName;
@@ -355,15 +354,8 @@ void RemoveContext (CitContext *con)
 
        syslog(LOG_NOTICE, "[%3d] Session ended.\n", con->cs_pid);
 
-       /* 
-        * If the client is still connected, blow 'em away. 
-        * if the socket is 0, its already gone or was never there.
-        */
-       if (con->client_socket != 0)
-       {
-               syslog(LOG_DEBUG, "Closing socket %d\n", con->client_socket);
-               close(con->client_socket);
-       }
+       /* If the client is still connected, blow 'em away. */
+       client_close();
 
        /* If using AUTHMODE_LDAP, free the DN */
        if (con->ldap_dn) {