From 9d550ba3abda5137cf4d8e759a0ee0bd889488d0 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 17 Sep 2007 16:02:58 +0000 Subject: [PATCH] Skeleton module for POP3 client --- citadel/Makefile.in | 2 ++ citadel/messages.c | 59 --------------------------------------- citadel/serv_extensions.c | 41 --------------------------- 3 files changed, 2 insertions(+), 100 deletions(-) diff --git a/citadel/Makefile.in b/citadel/Makefile.in index dc864add2..f1dfea84d 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -55,6 +55,7 @@ SERV_MODULES=modules/chat/serv_chat.o \ modules/newuser/serv_newuser.o \ modules/notes/serv_notes.o \ modules/pas2/serv_pas2.o \ + modules/pop3client/serv_pop3client.o \ md5.o \ modules/inetcfg/serv_inetcfg.o \ modules/rwho/serv_rwho.o \ @@ -137,6 +138,7 @@ SOURCES=aidepost.c auth.c base64.c chkpwd.c chkpw.c citadel.c citadel_ipc.c \ modules/ldap/serv_ldap.c \ modules/newuser/serv_newuser.c \ modules/pas2/serv_pas2.c \ + modules/pop3client/serv_pop3client.c \ modules/pop3/serv_pop3.c \ modules/rwho/serv_rwho.c \ modules/smtp/serv_smtp.c \ diff --git a/citadel/messages.c b/citadel/messages.c index 7de1c2329..97529331e 100644 --- a/citadel/messages.c +++ b/citadel/messages.c @@ -1021,65 +1021,6 @@ MEABT2: unlink(filename); } -#if 0 -/* - * Transmit message text to the server. - * - * This loop also implements a "tick" counter that displays the progress, if - * we're sending something that will take a long time to transmit. - */ -void transmit_message(CtdlIPC *ipc, FILE *fp) -{ - char buf[SIZ]; - int ch, a; - long msglen; - time_t lasttick; - - fseek(fp, 0L, SEEK_END); - msglen = ftell(fp); - rewind(fp); - lasttick = time(NULL); - strcpy(buf, ""); - while (ch = getc(fp), (ch >= 0)) { - if (ch == 10) { - if (!strcmp(buf, "000")) - strcpy(buf, ">000"); - CtdlIPC_putline(ipc, buf); - strcpy(buf, ""); - } else { - a = strlen(buf); - buf[a + 1] = 0; - buf[a] = ch; - if ((ch == 32) && (strlen(buf) > 200)) { - buf[a] = 0; - if (!strcmp(buf, "000")) - strcpy(buf, ">000"); - CtdlIPC_putline(ipc, buf); - strcpy(buf, ""); - } - if (strlen(buf) > 250) { - if (!strcmp(buf, "000")) - strcpy(buf, ">000"); - CtdlIPC_putline(ipc, buf); - strcpy(buf, ""); - } - } - - if ((time(NULL) - lasttick) > 2L) { - scr_printf(" %3ld%% completed\r", - ((ftell(fp) * 100L) / msglen)); - scr_flush(); - lasttick = time(NULL); - } - - } - CtdlIPC_putline(ipc, buf); - scr_printf(" \r"); - scr_flush(); -} -#endif - - /* * Make sure there's room in msg_arr[] for at least one more. */ diff --git a/citadel/serv_extensions.c b/citadel/serv_extensions.c index ced004cc4..7af3da534 100644 --- a/citadel/serv_extensions.c +++ b/citadel/serv_extensions.c @@ -254,47 +254,6 @@ int DLoader_Exec_Cmd(char *cmdbuf) return 0; } -#if 0 -void initialize_server_extensions(void) -{ - long filter; - - nSizErrmsg = 0; - - /*lprintf(CTDL_INFO, "%s\n", serv_bio_init()); - lprintf(CTDL_INFO, "%s\n", serv_calendar_init()); - lprintf(CTDL_INFO, "%s\n", serv_notes_init()); - lprintf(CTDL_INFO, "%s\n", serv_ldap_init()); - lprintf(CTDL_INFO, "%s\n", serv_chat_init()); - lprintf(CTDL_INFO, "%s\n", serv_expire_init()); - lprintf(CTDL_INFO, "%s\n", serv_imap_init()); - lprintf(CTDL_INFO, "%s\n", serv_upgrade_init()); - lprintf(CTDL_INFO, "%s\n", serv_inetcfg_init()); - lprintf(CTDL_INFO, "%s\n", serv_listsub_init()); - lprintf(CTDL_INFO, "%s\n", serv_mrtg_init()); - lprintf(CTDL_INFO, "%s\n", serv_netfilter_init()); - lprintf(CTDL_INFO, "%s\n", serv_network_init()); - lprintf(CTDL_INFO, "%s\n", serv_newuser_init()); - lprintf(CTDL_INFO, "%s\n", serv_pas2_init()); - lprintf(CTDL_INFO, "%s\n", serv_smtp_init()); - lprintf(CTDL_INFO, "%s\n", serv_pop3_init()); - lprintf(CTDL_INFO, "%s\n", serv_rwho_init()); - lprintf(CTDL_INFO, "%s\n", serv_spam_init());*/ - /* lprintf(CTDL_INFO, "%s\n", serv_test_init()); */ - /*lprintf(CTDL_INFO, "%s\n", serv_vandelay_init()); - lprintf(CTDL_INFO, "%s\n", serv_vcard_init()); - lprintf(CTDL_INFO, "%s\n", serv_fulltext_init()); - lprintf(CTDL_INFO, "%s\n", serv_autocompletion_init()); - lprintf(CTDL_INFO, "%s\n", serv_postfix_tcpdict()); - lprintf(CTDL_INFO, "%s\n", serv_sieve_init()); - lprintf(CTDL_INFO, "%s\n", serv_managesieve_init()); - lprintf(CTDL_INFO, "%s\n", serv_funambol_init());*/ - for (filter = 1; filter != 0; filter = filter << 1) - if ((filter & DetailErrorFlags) != 0) - LogPrintMessages(filter); -} - -#endif void CtdlRegisterCleanupHook(void (*fcn_ptr) (void)) { -- 2.30.2