* don't choke if the vcard fails to load
authorWilfried Göesgens <willi@citadel.org>
Thu, 7 May 2009 20:13:20 +0000 (20:13 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 7 May 2009 20:13:20 +0000 (20:13 +0000)
* upsi. serv_printf needs a formatstring as first argument...

webcit/messages.c
webcit/vcard_edit.c

index 055009199cf6cfc05193dc627fe1e6424e1ea8ae..c6d1c6e75602ef741d3949d1318c5914b825dcdf 100644 (file)
@@ -884,6 +884,8 @@ void readloop(long oper)
                        case VIEW_ADDRESSBOOK:
                                ab_name = NULL;
                                fetch_ab_name(Msg, &ab_name);
+                               if (ab_name == NULL) 
+                                       break;
                                ++num_ab;
                                addrbook = realloc(addrbook,
                                                   (sizeof(addrbookent) * num_ab) );
index 39e0cac1aba81c6417461e6a79faf2fcdb60da51..ccdaba684e5bf53178b4e0dc723a941971b3f752 100644 (file)
@@ -122,7 +122,7 @@ void fetch_ab_name(message_summary *Msg, char **namebuf) {
        memset(&summ, 0, sizeof(summ));
        //////safestrncpy(summ.subj, "(no subject)", sizeof summ.subj);
 
-       serv_printf(buf, "MSG0 %ld|0", Msg->msgnum);    /** unfortunately we need the mime info now */
+       serv_printf("MSG0 %ld|0", Msg->msgnum); /** unfortunately we need the mime info now */
        serv_getln(buf, sizeof buf);
        if (buf[0] != '1') return;