From f6d71aae85cfa20ef1e806b18b1bea18ac44720e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 10 Jul 2011 23:02:47 -0400 Subject: [PATCH] Removed Msg->reply_to because it held data for an older version of the code, we no longer do it this way --- webcit/messages.c | 33 --------------------------------- webcit/messages.h | 1 - webcit/msg_renderers.c | 4 +--- webcit/sieve.c | 2 +- webcit/tcp_sockets.c | 7 +++++-- 5 files changed, 7 insertions(+), 40 deletions(-) diff --git a/webcit/messages.c b/webcit/messages.c index 949683388..6d83128d2 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -46,7 +46,6 @@ int load_message(message_summary *Msg, StrBuf *FoundCharset, StrBuf **Error) { - wcsession *WCC = WC; StrBuf *Buf; StrBuf *HdrToken; headereval *Hdr; @@ -161,38 +160,6 @@ int load_message(message_summary *Msg, /* now we put the body mimepart we read above into the mimelist */ Put(Msg->AllAttach, SKEY(Msg->MsgBody->PartNum), Msg->MsgBody, DestroyMime); - /* Generate a reply-to address */ - if (StrLength(Msg->Rfca) > 0) { - if (Msg->reply_to == NULL) - Msg->reply_to = NewStrBuf(); - if (StrLength(Msg->from) > 0) { - StrBufPrintf(Msg->reply_to, "%s <%s>", ChrPtr(Msg->from), ChrPtr(Msg->Rfca)); - } - else { - FlushStrBuf(Msg->reply_to); - StrBufAppendBuf(Msg->reply_to, Msg->Rfca, 0); - } - } - else - { - if ((StrLength(Msg->OtherNode)>0) && - (strcasecmp(ChrPtr(Msg->OtherNode), ChrPtr(WCC->serv_info->serv_nodename))) && - (strcasecmp(ChrPtr(Msg->OtherNode), ChrPtr(WCC->serv_info->serv_humannode)) )) - { - if (Msg->reply_to == NULL) - Msg->reply_to = NewStrBuf(); - StrBufPrintf(Msg->reply_to, - "%s @ %s", - ChrPtr(Msg->from), - ChrPtr(Msg->OtherNode)); - } - else { - if (Msg->reply_to == NULL) - Msg->reply_to = NewStrBuf(); - FlushStrBuf(Msg->reply_to); - StrBufAppendBuf(Msg->reply_to, Msg->from, 0); - } - } FreeStrBuf(&Buf); FreeStrBuf(&HdrToken); return 1; diff --git a/webcit/messages.h b/webcit/messages.h index 62d290cbe..d7eefbda6 100644 --- a/webcit/messages.h +++ b/webcit/messages.h @@ -40,7 +40,6 @@ typedef struct _message_summary { StrBuf *subj; /* the title / subject */ StrBuf *reply_inreplyto; StrBuf *reply_references; - StrBuf *reply_to; StrBuf *cccc; StrBuf *hnod; StrBuf *AllRcpt; diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 74c34e5d6..ed58d93d5 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -51,9 +51,7 @@ void DestroyMessageSummary(void *vMsg) FreeStrBuf(&Msg->Rfca); FreeStrBuf(&Msg->OtherNode); - FreeStrBuf(&Msg->reply_to); - - DeleteHash(&Msg->Attachments); /**< list of Accachments */ + DeleteHash(&Msg->Attachments); /* list of Attachments */ DeleteHash(&Msg->Submessages); DeleteHash(&Msg->AttachLinks); DeleteHash(&Msg->AllAttach); diff --git a/webcit/sieve.c b/webcit/sieve.c index 4c6137096..8506e1fd9 100644 --- a/webcit/sieve.c +++ b/webcit/sieve.c @@ -1276,7 +1276,7 @@ HashList *GetSieveScriptListing(StrBuf *Target, WCTemplputParams *TP) if (num_scripts > have_rules_script) { - long rc; + long rc = 0; long len; const char *Key; void *vRuleset; diff --git a/webcit/tcp_sockets.c b/webcit/tcp_sockets.c index 8d3c6a885..b6953755e 100644 --- a/webcit/tcp_sockets.c +++ b/webcit/tcp_sockets.c @@ -275,8 +275,11 @@ void FlushReadBuf (void) pche = pch + len; if (WCC->ReadPos != pche) { - syslog(1, "ERROR: somebody didn't eat his soup! Remaing Chars: %ld [%s]\n", - pche - WCC->ReadPos, pche); + syslog(1, + "ERROR: somebody didn't eat his soup! Remaing Chars: %ld [%s]\n", + (long)(pche - WCC->ReadPos), + pche + ); syslog(1, "--------------------------------------------------------------------------------\n" "Whole buf: [%s]\n" -- 2.30.2