From fe6de48992523706b2bfe7e09d5389777970d728 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 7 May 2009 20:13:20 +0000 Subject: [PATCH] * don't choke if the vcard fails to load * upsi. serv_printf needs a formatstring as first argument... --- webcit/messages.c | 2 ++ webcit/vcard_edit.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/webcit/messages.c b/webcit/messages.c index 055009199..c6d1c6e75 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -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) ); diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index 39e0cac1a..ccdaba684 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -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; -- 2.30.2