* since we load vcards as message body now, finding a vcard attachment already loaded...
authorWilfried Göesgens <willi@citadel.org>
Sun, 8 Nov 2009 20:33:04 +0000 (20:33 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 8 Nov 2009 20:33:04 +0000 (20:33 +0000)
webcit/useredit.c

index 09d10898743c82e5840e893d558252b5662868aa..e14a53a721bb693c43962c51462591aa60517f10 100644 (file)
@@ -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;
                                                }
                                        }
                                }