]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/vcard/serv_vcard.c
CM_SetField() no longer accepts a length, just uses strdup()
[citadel.git] / citadel / server / modules / vcard / serv_vcard.c
index 599a1e8587e528908c0c7d4201086cd432359581..af831b78dcf289f85ffab65e9893a09d31566a4e 100644 (file)
@@ -245,7 +245,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg, struct recptypes *recp) {
 
                // Make the author of the message the name of the user.
                if (!IsEmptyStr(usbuf.fullname)) {
-                       CM_SetField(msg, eAuthor, usbuf.fullname, strlen(usbuf.fullname));
+                       CM_SetField(msg, eAuthor, usbuf.fullname);
                }
        }
 
@@ -268,7 +268,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg, struct recptypes *recp) {
                        snprintf(buf, sizeof buf, VCARD_EXT_FORMAT, msg->cm_fields[eAuthor], NODENAME);
                }
                else {
-                       // If the vCard has no UID, then give it one. */
+                       // If the vCard has no UID, then give it one.
                        generate_uuid(buf);
                }
                vcard_set_prop(v, "UID", buf, 0);
@@ -282,7 +282,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg, struct recptypes *recp) {
 
        s = vcard_get_prop(v, "UID", 1, 0, 0);
        if (!IsEmptyStr(s)) {
-               CM_SetField(msg, eExclusiveID, s, strlen(s));
+               CM_SetField(msg, eExclusiveID, s);
                if (CM_IsEmpty(msg, eMsgSubject)) {
                        CM_CopyField(msg, eMsgSubject, eExclusiveID);
                }
@@ -296,7 +296,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg, struct recptypes *recp) {
                s = vcard_get_prop(v, "N", 1, 0, 0);
        }
        if (!IsEmptyStr(s)) {
-               CM_SetField(msg, eMsgSubject, s, strlen(s));
+               CM_SetField(msg, eMsgSubject, s);
        }
 
        /* Re-serialize it back into the msg body */
@@ -1071,10 +1071,10 @@ void store_this_ha(struct addresses_to_be_filed *aptr) {
                        vmsg->cm_magic = CTDLMESSAGE_MAGIC;
                        vmsg->cm_anon_type = MES_NORMAL;
                        vmsg->cm_format_type = FMT_RFC822;
-                       CM_SetField(vmsg, eAuthor, HKEY("Citadel"));
+                       CM_SetField(vmsg, eAuthor, "Citadel");
                        s = vcard_get_prop(v, "UID", 1, 0, 0);
                        if (!IsEmptyStr(s)) {
-                               CM_SetField(vmsg, eExclusiveID, s, strlen(s));
+                               CM_SetField(vmsg, eExclusiveID, s);
                        }
                        ser = vcard_serialize(v);
                        if (ser != NULL) {