more logging and testing
[citadel.git] / citadel / context.c
index 0b545139b0998a7a32e7dba2c0807ae0f30b5be8..70657537ec02e20248dfb7467b4f1005d67fa037 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;
@@ -362,7 +361,7 @@ void RemoveContext (CitContext *con)
        if (con->client_socket != 0)
        {
                syslog(LOG_DEBUG, "Closing socket %d\n", con->client_socket);
-               close(con->client_socket);
+               if (close(con->client_socket)) syslog(LOG_NOTICE, "close() : %s", strerror(errno));
        }
 
        /* If using AUTHMODE_LDAP, free the DN */