]> code.citadel.org Git - citadel.git/blobdiff - webcit/messages.c
utf8ify_rfc822_string() is in libcitadel now
[citadel.git] / webcit / messages.c
index e474a7a06d0b909c1259a737931d9d76f1b5ed56..d0ad4d67c9451f927af3835e41af3ba421def87c 100644 (file)
@@ -181,7 +181,6 @@ int read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, co
        Msg = (message_summary *)malloc(sizeof(message_summary));
        if (!Msg) {
                syslog(LOG_DEBUG, "malloc() error");
-               TRACE;
        }
        memset(Msg, 0, sizeof(message_summary));
        Msg->msgnum = msgnum;
@@ -189,7 +188,6 @@ int read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, co
        Msg->MsgBody =  (wc_mime_attachment*) malloc(sizeof(wc_mime_attachment));
        if (!Msg->MsgBody) {
                syslog(LOG_DEBUG, "malloc() error");
-               TRACE;
        }
        memset(Msg->MsgBody, 0, sizeof(wc_mime_attachment));
        Msg->MsgBody->msgnum = msgnum;
@@ -544,7 +542,6 @@ int load_msg_ptrs(const char *servcmd,
                        Msg = (message_summary*)malloc(sizeof(message_summary));
                        if (!Msg) {
                                syslog(LOG_DEBUG, "malloc() error");
-                               TRACE;
                        }
                        memset(Msg, 0, sizeof(message_summary));
 
@@ -948,7 +945,7 @@ void post_mime_to_server(void) {
                                break;
                        }
                        syslog(LOG_DEBUG, "Attachment: raw len %d", StrLength(att->Data));
-                       encoded_strlen = CtdlEncodeBase64(encoded, ChrPtr(att->Data), StrLength(att->Data), 1);
+                       encoded_strlen = CtdlEncodeBase64(encoded, ChrPtr(att->Data), StrLength(att->Data), BASE64_YES_LINEBREAKS);
                        syslog(LOG_DEBUG, "Attachment: encoded len %d", encoded_strlen);
 
                        serv_printf("--%s", top_boundary);
@@ -961,14 +958,10 @@ void post_mime_to_server(void) {
                        serv_puts("");
                        free(encoded);
                }
-               syslog(LOG_DEBUG, "\033[33m sending final boundary --%s-- \033[0m", top_boundary);
-               TRACE;
                serv_printf("--%s--", top_boundary);
                DeleteHashPos(&it);
        }
 
-       syslog(LOG_DEBUG, "\033[33m sending terminating 000 \033[0m");
-       TRACE;
        serv_puts("000");
 }
 
@@ -1233,7 +1226,6 @@ void upload_attachment(void) {
        att = (wc_mime_attachment*)malloc(sizeof(wc_mime_attachment));
        if (!att) {
                syslog(LOG_DEBUG, "malloc() error");
-               TRACE;
        }
        memset(att, 0, sizeof(wc_mime_attachment ));
        att->length = WC->upload_length;
@@ -1839,9 +1831,6 @@ void view_or_download_mimepart(int force_download) {
        StrBufCutLeft(Buf, 4);
        bytes = StrBufExtract_long(Buf, 0, '|');
 
-       syslog(LOG_DEBUG, "\033[31mview or download %ld bytes\033[0m", bytes);
-
-
        if (force_download) {
                ContentType = NewStrBufPlain(HKEY("application/octet-stream"));
        }