[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_28-15
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_28-151-gdcb626d |
Date: |
Wed, 23 Dec 2009 13:43:49 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".
The branch, master has been updated
via dcb626d2a236b77498fdb769dfb87e75b0407292 (commit)
from 5c2e42fd0c022bb74d273be88fe66a366a98b764 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=dcb626d2a236b77498fdb769dfb87e75b0407292
commit dcb626d2a236b77498fdb769dfb87e75b0407292
Author: Daniele Forsi <address@hidden>
Date: Wed Dec 23 14:06:51 2009 +0100
When reading a vCard parse also "ADR;TYPE=HOME,PREF:"
Make gn_vcardstr2phonebook() fill entry->address with values written by
gn_phonebook2vcardstr().
This is the first step for fixing the vCard bug in comment #1 of
http://savannah.nongnu.org/bugs/?20901
diff --git a/common/vcard.c b/common/vcard.c
index 8fd4cce..34bce68 100644
--- a/common/vcard.c
+++ b/common/vcard.c
@@ -359,6 +359,23 @@ GNOKII_API int gn_vcardstr2phonebook(const char *vcard,
gn_phonebook_entry *entr
STORE("TEL;TYPE=PREF,VOICE:", entry->number);
STORE("TEL;TYPE=PREF:", entry->number);
+ if (BEGINS("ADR;TYPE=HOME,PREF:")) {
+ /* 64 is the value of GN_PHONEBOOK_ADDRESS_MAX_LENGTH */
+ /* FIXME sscanf() doesn't accept empty fields */
+ if (0 < sscanf(buf + 19,
"%64[^;];%64[^;];%64[^;];%64[^;];%64[^;];%64[^;];%64[^;]\n",
+ entry->address.post_office_box,
+ entry->address.extended_address,
+ entry->address.street,
+ entry->address.city,
+ entry->address.state_province,
+ entry->address.zipcode,
+ entry->address.country
+ )) {
+ entry->address.has_address = 1;
+ }
+ continue;
+ }
+
STORESUB("URL:", GN_PHONEBOOK_ENTRY_URL);
STORESUB("EMAIL;TYPE=INTERNET:", GN_PHONEBOOK_ENTRY_Email);
STORESUB("ADR;TYPE=HOME:", GN_PHONEBOOK_ENTRY_Postal);
-----------------------------------------------------------------------
Summary of changes:
common/vcard.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_28-151-gdcb626d,
Daniele Forsi <=