From 9e6daaebea9a563e81619aca4bca00c74fdea3ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Tue, 11 Nov 2008 23:15:07 +0000 Subject: [PATCH] * first trick to avoid double-rendering of mime-subparts --- webcit/msg_renderers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index cd3cd88ea..8f6232abd 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -318,6 +318,7 @@ void examine_mime_part(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundChars wc_mime_attachment *mime; StrBuf *Buf; void *vMimeRenderer; + int IsSubSub; mime = (wc_mime_attachment*) malloc(sizeof(wc_mime_attachment)); memset(mime, 0, sizeof(wc_mime_attachment)); @@ -333,6 +334,7 @@ void examine_mime_part(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundChars mime->PartNum = NewStrBuf(); StrBufExtract_token(mime->PartNum, HdrLine, 2, '|'); + IsSubSub = (strchr(ChrPtr(mime->PartNum), '.') != NULL); mime->Disposition = NewStrBuf(); StrBufExtract_token(mime->Disposition, HdrLine, 3, '|'); @@ -353,6 +355,10 @@ void examine_mime_part(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundChars Msg->AllAttach = NewHash(1,NULL); Put(Msg->AllAttach, SKEY(mime->PartNum), mime, DestroyMime); + if (IsSubSub){ + FreeStrBuf(&Buf); + return; + } if (GetHash(MimeRenderHandler, SKEY(mime->ContentType), &vMimeRenderer) && vMimeRenderer != NULL) -- 2.39.2