From 2cd0bde63d12852bfe34c36e2582aeb63d228edb Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 6 Jan 2017 18:24:25 -0500 Subject: [PATCH] Finished up headers mode 1 vs 9, also change vertical bars in subject to hyphens so it doesnt screw up the protocol --- citadel/citadel.h | 2 +- citadel/configure.ac | 2 +- citadel/modules/ctdlproto/serv_messages.c | 20 +++++++++++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/citadel/citadel.h b/citadel/citadel.h index a21b32e6f..cb2bafd9d 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -45,7 +45,7 @@ extern "C" { * usually more strict because you're not really supposed to dump/load and * upgrade at the same time. */ -#define REV_LEVEL 904 /* This version */ +#define REV_LEVEL 905 /* This version */ #define REV_MIN 591 /* Oldest compatible database */ #define EXPORT_REV_MIN 760 /* Oldest compatible export files */ #define LIBCITADEL_MIN 903 /* Minimum required version of libcitadel */ diff --git a/citadel/configure.ac b/citadel/configure.ac index 39015cb2e..0caefacec 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -AC_INIT([Citadel], [903], [http://www.citadel.org/]) +AC_INIT([Citadel], [905], [http://www.citadel.org/]) AC_REVISION([$Revision: 5108 $]) AC_CONFIG_SRCDIR([citserver.c]) AC_CONFIG_HEADER(sysdep.h) 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); } -- 2.30.2