* user_ops.c: fixed become_session() when calling EVT_LOGOUT session hooks
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 6 Jan 2002 08:54:59 +0000 (08:54 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 6 Jan 2002 08:54:59 +0000 (08:54 +0000)
citadel/ChangeLog
citadel/user_ops.c

index 683f69fe14a21f8c4858f838e0e42540aee9681e..2882b925d0baf82f6ebd7e6c104ed5fbe9704124 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 590.41  2002/01/06 08:54:58  error
+ * user_ops.c: fixed become_session() when calling EVT_LOGOUT session hooks
+
  Revision 590.40  2002/01/05 22:31:22  ajc
  * Removed some protocol commands and writeups that are no longer necessary
  * Began some of the framework for the Global Address Book
@@ -3083,3 +3086,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 7905bfa00653f881eb3f12db5a9a4a4a45fcee47..0db8d1e7f6cfd9aa92f09f77ba9185bd0ff7060c 100644 (file)
@@ -430,6 +430,8 @@ void logged_in_response(void)
  */
 void logout(struct CitContext *who)
 {
+       struct CitContext *saved_cc = NULL;
+
        who->logged_in = 0;
 
        /*
@@ -455,9 +457,11 @@ void logout(struct CitContext *who)
        }
 
        /* Do modular stuff... */
+       if (who != CC)
+               saved_cc = CC;
        become_session(who);
        PerformSessionHooks(EVT_LOGOUT);
-       become_session(NULL);
+       become_session(saved_cc);
 }
 
 #ifdef ENABLE_CHKPWD