]> code.citadel.org Git - citadel.git/blobdiff - webcit/messages.c
comment style
[citadel.git] / webcit / messages.c
index 1024e0657885d03a657cbcc9f6c675214c9d7d4e..e474a7a06d0b909c1259a737931d9d76f1b5ed56 100644 (file)
@@ -851,10 +851,8 @@ void readloop(long oper, eCustomRoomRenderer ForceRenderer) {
 }
 
 
-/*
- * Back end for post_message()
- * ... this is where the actual message gets transmitted to the server.
- */
+// Back end for post_message()
+// This is where the actual message gets transmitted to the server.
 void post_mime_to_server(void) {
        char top_boundary[SIZ];
        char alt_boundary[SIZ];
@@ -903,8 +901,7 @@ void post_mime_to_server(void) {
        /* Remember, serv_printf() appends an extra newline */
        if (include_text_alt) {
                StrBuf *Buf;
-               serv_printf("Content-type: multipart/alternative; "
-                       "boundary=\"%s\"\n", alt_boundary);
+               serv_printf("Content-type: multipart/alternative; boundary=\"%s\"\n", alt_boundary);
                serv_printf("This is a multipart message in MIME format.\n");
                serv_printf("--%s", alt_boundary);
 
@@ -964,10 +961,14 @@ 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");
 }
 
@@ -1798,14 +1799,13 @@ void postpart(StrBuf *partnum, StrBuf *filename, int force_download) {
 }
 
 
-/*
- * Generic function to output an arbitrary MIME part from an arbitrary
- * message number on the server.
- *
- * msgnum              message number on the citadel server
- * partnum             MIME part number to be output
- * force_download      Nonzero to force set the Content-Type: header to "application/octet-stream"
- */
+// Generic function to output an arbitrary MIME part from an arbitrary
+// message number on the server.
+//
+// msgnum              message number on the citadel server
+// partnum             MIME part number to be output
+// force_download      Nonzero to force set the Content-Type: header to "application/octet-stream"
+
 void view_or_download_mimepart(int force_download) {
        long msgnum;
        off_t bytes;
@@ -1839,6 +1839,9 @@ 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"));
        }