From: Art Cancro Date: Tue, 13 Mar 2007 02:51:33 +0000 (+0000) Subject: Changes to vcard handler required for Bynari Connector support X-Git-Tag: v7.86~3520 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=c39a9ab1218f0ebda85fe9aafaa6b31e9ee56319 Changes to vcard handler required for Bynari Connector support --- diff --git a/webcit/messages.c b/webcit/messages.c index ed89b4899..65a322e28 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -832,7 +832,8 @@ void read_message(long msgnum, int printable_view, char *section) { } /** begin handler prep ***/ - if (!strcasecmp(mime_content_type, "text/x-vcard")) { + if ( (!strcasecmp(mime_content_type, "text/x-vcard")) + || (!strcasecmp(mime_content_type, "text/vcard")) ) { strcpy(vcard_partnum, mime_partnum); } @@ -1620,7 +1621,8 @@ void display_addressbook(long msgnum, char alpha) { extract_token(mime_content_type, &buf[5], 4, '|', sizeof mime_content_type); mime_length = extract_int(&buf[5], 5); - if (!strcasecmp(mime_content_type, "text/x-vcard")) { + if ( (!strcasecmp(mime_content_type, "text/x-vcard")) + || (!strcasecmp(mime_content_type, "text/vcard")) ) { strcpy(vcard_partnum, mime_partnum); } @@ -1697,7 +1699,7 @@ void fetch_ab_name(long msgnum, char *namebuf) { memset(&summ, 0, sizeof(summ)); safestrncpy(summ.subj, "(no subject)", sizeof summ.subj); - sprintf(buf, "MSG0 %ld|1", msgnum); /** ask for headers only */ + sprintf(buf, "MSG0 %ld|0", msgnum); /** unfortunately we need the mime info now */ serv_puts(buf); serv_getln(buf, sizeof buf); if (buf[0] != '1') return; @@ -1710,7 +1712,8 @@ void fetch_ab_name(long msgnum, char *namebuf) { extract_token(mime_content_type, &buf[5], 4, '|', sizeof mime_content_type); mime_length = extract_int(&buf[5], 5); - if (!strcasecmp(mime_content_type, "text/x-vcard")) { + if ( (!strcasecmp(mime_content_type, "text/x-vcard")) + || (!strcasecmp(mime_content_type, "text/vcard")) ) { strcpy(vcard_partnum, mime_partnum); } diff --git a/webcit/useredit.c b/webcit/useredit.c index 585a954db..a74d7bcfb 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -135,8 +135,8 @@ TRYAGAIN: if (!strncasecmp(buf, "part=", 5)) { extract_token(partnum, &buf[5], 2, '|', sizeof partnum); extract_token(content_type, &buf[5], 4, '|', sizeof content_type); - if (!strcasecmp(content_type, - "text/x-vcard")) { + if ( (!strcasecmp(content_type, "text/x-vcard")) + || (!strcasecmp(content_type, "text/vcard")) ) { vcard_msgnum = stuff->msgnum; } }