]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_pop3.c
* Shut off hostname resolution when dealing with Unix domain sockets
[citadel.git] / citadel / serv_pop3.c
index dd193b7bf98965ca02c7a0e10488992261e818bd..59c7a2ca74c0282321826fd1b3fb900d907331ab 100644 (file)
@@ -265,7 +265,7 @@ void pop3_stat(char *argbuf) {
  */
 void pop3_retr(char *argbuf) {
        int which_one;
-       int ch;
+       int ch = 0;
        size_t bytes_remaining;
 
        which_one = atoi(argbuf);
@@ -286,6 +286,9 @@ void pop3_retr(char *argbuf) {
                ch = getc(POP3->msgs[which_one - 1].temp);
                cprintf("%c", ch);
        }
+       if (ch != 10) {
+               lprintf(5, "Problem: message ends with 0x%2x, not 0x0a\n", ch);
+       }
        cprintf(".\r\n");
 }
 
@@ -535,7 +538,8 @@ void pop3_command_loop(void) {
 char *Dynamic_Module_Init(void)
 {
        SYM_POP3 = CtdlGetDynamicSymbol();
-       CtdlRegisterServiceHook(POP3_PORT,
+       CtdlRegisterServiceHook(config.c_pop3_port,
+                               NULL,
                                pop3_greeting,
                                pop3_command_loop);
        CtdlRegisterSessionHook(pop3_cleanup_function, EVT_STOP);