summaryrefslogtreecommitdiff
path: root/extra/abook/vcard.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/abook/vcard.patch')
-rw-r--r--extra/abook/vcard.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/extra/abook/vcard.patch b/extra/abook/vcard.patch
new file mode 100644
index 000000000..55630c1e5
--- /dev/null
+++ b/extra/abook/vcard.patch
@@ -0,0 +1,26 @@
+diff -Naur old/filter.c new/filter.c
+--- old/filter.c 2013-08-22 20:49:06.229337260 -1000
++++ new/filter.c 2013-08-22 20:49:13.552700987 -1000
+@@ -1673,7 +1673,7 @@
+ // vCard(the country name)
+ item_fput(item, COUNTRY, xstrdup(strsep(&value, ";")));
+
+- if(*value) xfree(value);
++ if(value) xfree(value);
+ }
+
+ static void
+@@ -2052,6 +2052,13 @@
+
+ free(name);
+
++ if(db_fget(item, NICK))
++ fprintf(out, "NICKNAME:%s\r\n",
++ safe_str(db_fget(item, NICK)));
++ if(db_fget(item, ANNIVERSARY))
++ fprintf(out, "BIRTHDAY:%s\r\n",
++ safe_str(db_fget(item, ANNIVERSARY)));
++
+ // see rfc6350 section 6.3.1
+ if(db_fget(item, ADDRESS)) {
+ fprintf(out, "ADR:;%s;%s;%s;%s;%s;%s\r\n",