X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;ds=sidebyside;f=citadel%2Fmodules%2Fctdlproto%2Fserv_messages.c;h=96e49b6534cf7e21636ac4cc52db8d4cef31fec2;hb=2cd0bde63d12852bfe34c36e2582aeb63d228edb;hp=4be56cde67508f75b1b8225e25f692fd26872b09;hpb=56b9c7b63d9169bca7bcaeaff5c2c997cc603856;p=citadel.git diff --git a/citadel/modules/ctdlproto/serv_messages.c b/citadel/modules/ctdlproto/serv_messages.c index 4be56cde6..96e49b653 100644 --- a/citadel/modules/ctdlproto/serv_messages.c +++ b/citadel/modules/ctdlproto/serv_messages.c @@ -48,6 +48,17 @@ void headers_listing(long msgnum, void *userdata) return; } + // change all vertical bars in the subject to hyphens so it doesn't screw up the protocol + if (!CM_IsEmpty(msg, eMsgSubject)) { + char *p; + for (p=msg->cm_fields[eMsgSubject]; *p; p++) { + printf("%c\n", *p); + if (*p == '|') { + *p = '-'; + } + } + } + // output all fields except the references hash cprintf("%ld|%s|%s|%s|%s|%s", msgnum, @@ -58,7 +69,7 @@ void headers_listing(long msgnum, void *userdata) (!CM_IsEmpty(msg, eMsgSubject) ? msg->cm_fields[eMsgSubject] : "") ); - if (output_mode == MSG_HDRS_THREADS) { + if (output_mode == MSG_HDRS_THREADS) { // field view with thread hashes // output the references hash cprintf ("|%d|", @@ -76,10 +87,13 @@ void headers_listing(long msgnum, void *userdata) } } - cprintf("|"); + cprintf("|\n"); + } + + else { // field view with no threads, subject extends out forever + cprintf("\n"); } - cprintf("\n"); CM_Free(msg); }