]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/imap_fetch.c
* indentation fix
[citadel.git] / citadel / modules / imap / imap_fetch.c
index 0ee327cb87ade858d3cbeb4d5d34b7f06659ce83..45946b2f0d6e86899deda79a51dd00041fefc7fc 100644 (file)
@@ -620,9 +620,8 @@ void imap_fetch_body(long msgnum, ConstStr item, int is_peek) {
        if (strchr(ChrPtr(section), '[') != NULL) {
                StrBufStripAllBut(section, '[', ']');
        }
-       CtdlLogPrintf(CTDL_DEBUG, "Section is: %s%s\n", 
-                     ChrPtr(section), 
-                     (StrLength(section) == 0) ? "(empty)" : ""
+       CtdlLogPrintf(CTDL_DEBUG, "Section is: [%s]\n", 
+             (StrLength(section) == 0) ? "(empty)" : ChrPtr(section)
        );
 
        /* Burn the cache if we don't have the same section of the 
@@ -654,11 +653,9 @@ void imap_fetch_body(long msgnum, ConstStr item, int is_peek) {
                StrBufStripAllBut(partial, '<', '>');
                is_partial = 1;
        }
-       if (is_partial == 0) 
-               if (StrLength(partial) > 0) 
-                       CtdlLogPrintf(CTDL_DEBUG, 
-                                     "Partial is %s\n", 
-                                     ChrPtr(partial));
+       if ( (is_partial == 1) && (StrLength(partial) > 0) ) {
+               CtdlLogPrintf(CTDL_DEBUG, "Partial is <%s>\n", ChrPtr(partial));
+       }
 
        if (IMAP->cached_body == NULL) {
                CCC->redirect_buffer = NewStrBufPlain(NULL, SIZ);
@@ -708,7 +705,8 @@ void imap_fetch_body(long msgnum, ConstStr item, int is_peek) {
                mime_parser(msg->cm_fields['M'], NULL,
                                *imap_load_part, NULL, NULL,
                                section,
-                               1);
+                               1
+               );
        }
 
        if (loading_body_now) {
@@ -946,7 +944,7 @@ void imap_fetch_bodystructure (long msgnum, const char *item,
 
                ptr = rfc822;
                do {
-                       ptr = memreadline(ptr, buf, sizeof buf);
+                       ptr = cmemreadline(ptr, buf, sizeof buf);
                        ++lines;
                        if ((IsEmptyStr(buf)) && (rfc822_body == NULL)) {
                                rfc822_body = ptr;