]> code.citadel.org Git - citadel.git/blobdiff - citadel/citserver.c
EVT_LOGOUT hooks are now called with the thread's current
[citadel.git] / citadel / citserver.c
index 6dba619936c800ab85004676a4f547c02d10d46d..2ec71080903b30562e41d753f29d9eeecfac2c4d 100644 (file)
@@ -248,13 +248,10 @@ void RemoveContext (struct CitContext *con)
         *       might make references to "CC" assuming it's the right one.
         */
        become_session(con);
+       logout();
        PerformSessionHooks(EVT_STOP);
        become_session(NULL);
 
-       /* Now handle all of the administrivia. */
-       lprintf(CTDL_DEBUG, "Calling logout(%d)\n", con->cs_pid);
-       logout(con);
-
        lprintf(CTDL_NOTICE, "[%3d] Session ended.\n", con->cs_pid);
 
        /* If the client is still connected, blow 'em away. */
@@ -1085,7 +1082,7 @@ void do_command_loop(void) {
        }
 
        else if (!strncasecmp(cmdbuf,"LOUT",4)) {
-               if (CC->logged_in) logout(CC);
+               if (CC->logged_in) logout();
                cprintf("%d logged out.\n", CIT_OK);
        }