From c590738f3932fdbf92d2a1b0cba6b60402254ee1 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 22 Jan 2012 16:44:45 +0100 Subject: [PATCH] map_fetch_body() pass StrBuf* into the mimeparser instead of char*, so we fix one warning; Use the StrBuf inside of imap_load_part() appropriate. --- citadel/modules/imap/imap_fetch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/citadel/modules/imap/imap_fetch.c b/citadel/modules/imap/imap_fetch.c index 702a27f10..aa9a3dfc0 100644 --- a/citadel/modules/imap/imap_fetch.c +++ b/citadel/modules/imap/imap_fetch.c @@ -285,21 +285,21 @@ void imap_load_part(char *name, char *filename, char *partnum, char *disp, char *cbid, void *cbuserdata) { char mimebuf2[SIZ]; - char *desired_section; + StrBuf *desired_section; - desired_section = (char *)cbuserdata; + desired_section = (StrBuf *)cbuserdata; syslog(LOG_DEBUG, "imap_load_part() looking for %s, found %s", - desired_section, - partnum + ChrPtr(desired_section), + partnum ); - if (!strcasecmp(partnum, desired_section)) { + if (!strcasecmp(partnum, ChrPtr(desired_section))) { client_write(content, length); } snprintf(mimebuf2, sizeof mimebuf2, "%s.MIME", partnum); - if (!strcasecmp(desired_section, mimebuf2)) { + if (!strcasecmp(ChrPtr(desired_section), mimebuf2)) { client_write(HKEY("Content-type: ")); client_write(cbtype, strlen(cbtype)); if (!IsEmptyStr(cbcharset)) { @@ -754,10 +754,10 @@ void imap_fetch_body(long msgnum, ConstStr item, int is_peek) { */ else { mime_parser(msg->cm_fields['M'], NULL, - *imap_load_part, NULL, NULL, - ChrPtr(section), - 1 - ); + *imap_load_part, NULL, NULL, + section, + 1 + ); } if (loading_body_now) { -- 2.30.2