Changes to vcard handler required for Bynari Connector support
authorArt Cancro <ajc@citadel.org>
Tue, 13 Mar 2007 02:51:33 +0000 (02:51 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 13 Mar 2007 02:51:33 +0000 (02:51 +0000)
webcit/messages.c
webcit/useredit.c

index ed89b48996db86c67f916db45f7b91e95b161733..65a322e28e67fc6db5d69d3610cc5c69b28d54f3 100644 (file)
@@ -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);
                        }
 
index 585a954db833cb8a29740f9323c8ae1104a89422..a74d7bcfb3a6f72f4b14bcc752b799accbc08155 100644 (file)
@@ -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;
                                        }
                                }