more logging and testing
authorArt Cancro <ajc@citadel.org>
Thu, 17 Mar 2011 03:07:23 +0000 (23:07 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 15:10:17 +0000 (15:10 +0000)
citadel/context.c
citadel/user_ops.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 */
index 7eefb54eb8240359e8c70aef6d4b1c007db17f99..d7f88ad4dc79e1fa94d39d00a69044925db64bd2 100644 (file)
@@ -778,7 +778,9 @@ void CtdlUserLogout(void)
 {
        CitContext *CCC = MyContext();
 
-       syslog(LOG_DEBUG, "CtdlUserLogout() logging out <%s>\n", CCC->curr_user);
+       syslog(LOG_DEBUG, "CtdlUserLogout() logging out <%s> from session %d",
+               CCC->curr_user, CCC->cs_pid
+       );
 
        /*
         * If there is a download in progress, abort it.