]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_pop3.c
* The scheduler can now "wake up" a session to deliver async messages.
[citadel.git] / citadel / serv_pop3.c
index e04e60b92083337822cc655f385d86fcbdc9bf7b..c5325d92136bc67f56b6c516ee1e37bc9ec8fe5c 100644 (file)
@@ -83,7 +83,7 @@ void pop3_cleanup_function(void) {
                        POP3->msgs[i].temp = NULL;
                }
        }
-       if (POP3->msgs != NULL) phree(POP3->msgs);
+       if (POP3->msgs != NULL) free(POP3->msgs);
 
        lprintf(CTDL_DEBUG, "Finished POP3 cleanup hook\n");
 }
@@ -138,8 +138,8 @@ void pop3_add_message(long msgnum, void *userdata) {
        lprintf(CTDL_DEBUG, "in pop3_add_message()\n");
 
        ++POP3->num_msgs;
-       if (POP3->num_msgs < 2) POP3->msgs = mallok(sizeof(struct pop3msg));
-       else POP3->msgs = reallok(POP3->msgs, 
+       if (POP3->num_msgs < 2) POP3->msgs = malloc(sizeof(struct pop3msg));
+       else POP3->msgs = realloc(POP3->msgs, 
                (POP3->num_msgs * sizeof(struct pop3msg)) ) ;
        POP3->msgs[POP3->num_msgs-1].msgnum = msgnum;
        POP3->msgs[POP3->num_msgs-1].deleted = 0;
@@ -654,7 +654,8 @@ char *serv_pop3_init(void)
        CtdlRegisterServiceHook(config.c_pop3_port,
                                NULL,
                                pop3_greeting,
-                               pop3_command_loop);
+                               pop3_command_loop,
+                               NULL);
        CtdlRegisterSessionHook(pop3_cleanup_function, EVT_STOP);
        return "$Id$";
 }