From 1df716eddbca297ce382f34b26fc70816643f9d9 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Mon, 8 Nov 2010 21:44:29 +0100 Subject: [PATCH] fix some incompletely transformed reply strings; thanks gcov & imaptest --- citadel/modules/imap/imap_misc.c | 4 ++-- citadel/modules/imap/imap_tools.h | 10 +--------- citadel/modules/imap/serv_imap.c | 6 +++--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/citadel/modules/imap/imap_misc.c b/citadel/modules/imap/imap_misc.c index 500c2dc6a..d62f487fa 100644 --- a/citadel/modules/imap/imap_misc.c +++ b/citadel/modules/imap/imap_misc.c @@ -212,7 +212,7 @@ void imap_copy(int num_parms, ConstStr *Params) { IAPuts("COPY completed\r\n"); } else { - IReplyPrintf("NO COPY failed (error %d)\r\n", ret); + IReplyPrintf("NO COPY failed (error %d)", ret); } } @@ -414,7 +414,7 @@ void imap_append(int num_parms, ConstStr *Params) { GLOBAL_UIDVALIDITY_VALUE, new_msgnum); } else { - IReplyPrintf("BAD Error %ld saving message to disk.\r\n", + IReplyPrintf("BAD Error %ld saving message to disk.", new_msgnum); } } diff --git a/citadel/modules/imap/imap_tools.h b/citadel/modules/imap/imap_tools.h index 52afbacbc..e5b785088 100644 --- a/citadel/modules/imap/imap_tools.h +++ b/citadel/modules/imap/imap_tools.h @@ -34,9 +34,6 @@ int imap_mailbox_matches_pattern(const char *pattern, char *mailboxname); int imap_datecmp(const char *datestr, time_t msgtime); - - - /* Imap Append Printf, send to the outbuffer */ void IAPrintf(const char *Format, ...); @@ -57,9 +54,4 @@ void IPutStr(const char *Msg, long Len); #define IPutCStr(_ConstStr) IPutStr(CKEY(_ConstStr)) #define IPutCParamStr(n) IPutStr(CKEY(Params[n])) -/* -void plain_imap_strout(char *buf) -void imap_strout(ConstStr *args) -*/ - - +void IUnbuffer (void); diff --git a/citadel/modules/imap/serv_imap.c b/citadel/modules/imap/serv_imap.c index 753396213..959dec882 100644 --- a/citadel/modules/imap/serv_imap.c +++ b/citadel/modules/imap/serv_imap.c @@ -637,7 +637,7 @@ void imap_login(int num_parms, ConstStr *Params) } else { - IReplyPrintf("NO AUTHENTICATE %s failed\r\n", + IReplyPrintf("NO AUTHENTICATE %s failed", Params[3].Key); } } @@ -1046,7 +1046,7 @@ void imap_create(int num_parms, ConstStr *Params) if (flags & IR_MAILBOX) { if (strncasecmp(Params[2].Key, "INBOX/", 6)) { - IReply("%s NO Personal folders must be created under INBOX"); + IReply("NO Personal folders must be created under INBOX"); CtdlLogPrintf(CTDL_DEBUG, "not subordinate to inbox\n"); return; } @@ -1068,7 +1068,7 @@ void imap_create(int num_parms, ConstStr *Params) /*** DO NOT CHANGE THIS ERROR MESSAGE IN ANY WAY! BYNARI CONNECTOR DEPENDS ON IT! ***/ IReply("NO Mailbox already exists, or create failed"); } else { - IReply("%s OK CREATE completed"); + IReply("OK CREATE completed"); /* post a message in Aide> describing the new room */ notification_message = malloc(1024); snprintf(notification_message, 1024, -- 2.30.2