From: Wilfried Göesgens Date: Sun, 8 Nov 2009 20:33:04 +0000 (+0000) Subject: * since we load vcards as message body now, finding a vcard attachment already loaded... X-Git-Tag: v7.86~646 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=becca19d0fc9afc1421cd74edad1997e64754439 * since we load vcards as message body now, finding a vcard attachment already loaded is no mistake. --- diff --git a/webcit/useredit.c b/webcit/useredit.c index 09d108987..e14a53a72 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -442,7 +442,8 @@ TRYAGAIN: if (Msg->AllAttach != NULL) { att = GetNewHashPos(Msg->AllAttach, 0); - while (GetNextHashPos(Msg->AllAttach, att, &HKLen, &HashKey, &vMsg)) { + while (GetNextHashPos(Msg->AllAttach, att, &HKLen, &HashKey, &vMsg) && + (vcard_msgnum == -1)) { Att = (wc_mime_attachment*) vMsg; if ( (strcasecmp(ChrPtr(Att->ContentType), "text/x-vcard") == 0) @@ -450,9 +451,9 @@ TRYAGAIN: ) { *VCAtt = Att; *VCMsg = Msg; + vcard_msgnum = Msg->msgnum; if (Att->Data == NULL) { MimeLoadData(Att); - vcard_msgnum = Msg->msgnum; } } }