Performance improvement / Bugfix Mime handling while outputting messages:
authorWilfried Goesgens <dothebart@citadel.org>
Fri, 10 Dec 2010 18:13:28 +0000 (19:13 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Fri, 10 Dec 2010 18:13:28 +0000 (19:13 +0100)
  - we switched to decode just that part we'd want to output, we should choose the pointer with the decoded buffer.

citadel/msgbase.c

index 41b8171b9fb289f34697063d02dae06f9a2a5da9..9c8ab860216f2c0cf214bfc626ac4c9612c95a49 100644 (file)
@@ -1460,7 +1460,7 @@ void output_preferred(char *name,
                extract_token(buf, CC->preferred_formats, i, '|', sizeof buf);
                if (!strcasecmp(buf, cbtype)) {
                        /* Yeah!  Go!  W00t!! */
-                       if (ma->dont_decode == 0)
+                       if (ma->dont_decode == 0) 
                                rc = mime_decode_now (content, 
                                                      length,
                                                      encoding,
@@ -1492,7 +1492,7 @@ void output_preferred(char *name,
                        }
                        cprintf("X-Citadel-MSG4-Partnum: %s\n", partnum);
                        cprintf("\n");
-                       client_write(content, length);
+                       client_write(text_content, length);
                        if (add_newline) cprintf("\n");
                        if (decoded != NULL) free(decoded);
                        return;