]> code.citadel.org Git - citadel.git/blobdiff - citadel/citserver.c
ICQ changes
[citadel.git] / citadel / citserver.c
index 5543386a978e858280b5d4dfbf719c44d166b23f..c5cc618a41f0dd3c467cb9453b8280ab59ab88b2 100644 (file)
@@ -139,9 +139,6 @@ void cleanup_stuff(void *arg)
 
        syslog(LOG_NOTICE,"session %d ended", CC->cs_pid);
        
-       /* Deallocate any message list we might have in memory */
-       if (CC->msglist != NULL) phree(CC->msglist);
-
        /* Deallocate any user-data attached to this session */
        deallocate_user_data(CC);
 
@@ -820,8 +817,6 @@ void *context_loop(struct CitContext *con)
        CC->upload_fp = NULL;
        CC->cs_pid = con->client_socket;        /* not necessarily portable */
        CC->FirstExpressMessage = NULL;
-       CC->msglist = NULL;
-       CC->num_msgs = 0;
        time(&CC->lastcmd);
        time(&CC->lastidle);
        strcpy(CC->lastcmdname, "    ");
@@ -1257,6 +1252,9 @@ void *context_loop(struct CitContext *con)
                                    ERROR);
                        }
 
+               /* Run any after-each-command outines registered by modules */
+               PerformSessionHooks(EVT_CMD);
+
                } while(strncasecmp(cmdbuf, "QUIT", 4));
 
        cleanup(EXIT_NORMAL);