X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fimap%2Fimap_fetch.c;h=436a4b243857d8c6bcee53635911e00c45cc8a6b;hb=e87452481eae22f861f601fdb082a4fa75567dc4;hp=3cd92cb32717722bd7f9e0ca19fad11d651a7137;hpb=1e656d277fe91b7c4f5d73eab4a0dd0b7a173145;p=citadel.git diff --git a/citadel/modules/imap/imap_fetch.c b/citadel/modules/imap/imap_fetch.c index 3cd92cb32..436a4b243 100644 --- a/citadel/modules/imap/imap_fetch.c +++ b/citadel/modules/imap/imap_fetch.c @@ -49,6 +49,7 @@ #include "imap_tools.h" #include "imap_fetch.h" #include "genstamp.h" +#include "ctdl_module.h" @@ -174,7 +175,7 @@ void imap_fetch_rfc822(long msgnum, char *whichfmt) { CC->redirect_alloc = SIZ; CtdlOutputMsg(msgnum, MT_RFC822, (need_body ? HEADERS_ALL : HEADERS_ONLY), - 0, 1, NULL); + 0, 1, NULL, 0); if (!need_body) cprintf("\r\n"); /* extra trailing newline */ IMAP->cached_rfc822_data = CC->redirect_buffer; IMAP->cached_rfc822_len = CC->redirect_len; @@ -218,7 +219,7 @@ void imap_fetch_rfc822(long msgnum, char *whichfmt) { text_size = 0; } - lprintf(CTDL_DEBUG, + CtdlLogPrintf(CTDL_DEBUG, "RFC822: headers=" SIZE_T_FMT ", text=" SIZE_T_FMT ", total=" SIZE_T_FMT "\n", @@ -586,7 +587,7 @@ void imap_fetch_body(long msgnum, char *item, int is_peek) { if (strchr(section, '[') != NULL) { stripallbut(section, '[', ']'); } - lprintf(CTDL_DEBUG, "Section is: %s%s\n", + CtdlLogPrintf(CTDL_DEBUG, "Section is: %s%s\n", section, IsEmptyStr(section) ? "(empty)" : ""); @@ -633,7 +634,7 @@ void imap_fetch_body(long msgnum, char *item, int is_peek) { is_partial = 1; } if (is_partial == 0) strcpy(partial, ""); - /* if (!IsEmptyStr(partial)) lprintf(CTDL_DEBUG, "Partial is %s\n", partial); */ + /* if (!IsEmptyStr(partial)) CtdlLogPrintf(CTDL_DEBUG, "Partial is %s\n", partial); */ if (IMAP->cached_body == NULL) { CC->redirect_buffer = malloc(SIZ); @@ -650,11 +651,11 @@ void imap_fetch_body(long msgnum, char *item, int is_peek) { } else if ( (!strcmp(section, "1")) && (msg->cm_format_type != 4) ) { - CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_NONE, 0, 1); + CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_NONE, 0, 1, 0); } else if (!strcmp(section, "")) { - CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ALL, 0, 1); + CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ALL, 0, 1, 0); } /* @@ -662,7 +663,7 @@ void imap_fetch_body(long msgnum, char *item, int is_peek) { * fields, strip it down. */ else if (!strncasecmp(section, "HEADER", 6)) { - CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ONLY, 0, 1); + CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ONLY, 0, 1, 0); imap_strip_headers(section); } @@ -670,7 +671,7 @@ void imap_fetch_body(long msgnum, char *item, int is_peek) { * Strip it down if the client asked for everything _except_ headers. */ else if (!strncasecmp(section, "TEXT", 4)) { - CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_NONE, 0, 1); + CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_NONE, 0, 1, 0); } /* @@ -915,7 +916,7 @@ void imap_fetch_bodystructure (long msgnum, char *item, CC->redirect_buffer = malloc(SIZ); CC->redirect_len = 0; CC->redirect_alloc = SIZ; - CtdlOutputPreLoadedMsg(msg, MT_RFC822, 0, 0, 1); + CtdlOutputPreLoadedMsg(msg, MT_RFC822, 0, 0, 1, 0); rfc822 = CC->redirect_buffer; rfc822_len = CC->redirect_len; CC->redirect_buffer = NULL;