Skip to contentSkip to conversation

Fix vcard filter setting

PATCH In review Marcel Mol 2 participants 2 messages Jul 27, 2010 – Aug 2, 2010 Bluetooth drivers

lore
Share & tools
lore

Marcel Mol

author
#0 lore raw

PATCH 1/2 Fix vcard filter setting

The bits for VCARD version 2.1 and version 3.0 were wrong:
oin case of 2.1 the FN bit was on and for 3.0 it is off. The comment state that 3.0 needs FN while 2.1 does not. This patch fixes that.

---
 plugins/phonebook-ebook.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
plugins/phonebook-ebook.c +1 -1
index 2d5bec3..089b956 100644
@@ -107,7 +107,7 @@ static char *evcard_to_string(EVCard *evcard, unsigned int format,
 	 * Mandatory attributes for vCard 2.1 are VERSION ,N and TEL.
 	 * Mandatory attributes for vCard 3.0 are VERSION, N, FN and TEL
 	 */
-	filter = format == EVC_FORMAT_VCARD_30 ? filter | 0x85: filter | 0x87;
+	filter = format == EVC_FORMAT_VCARD_30 ? filter | 0x87: filter | 0x85;
 
 	evcard2 = e_vcard_new();
 	for (i = 0; i < 29; i++) {
Signature · 1 line
1.7.1.1
#1 lore raw

Hi,

Quoted 7 lines · Marcel Mol

The bits for VCARD version 2.1 and version 3.0 were wrong:
oin case of 2.1 the FN bit was on and for 3.0 it is off. The comment state that 3.0 needs FN while 2.1 does not. This patch fixes that.

---
 plugins/phonebook-ebook.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Thanks for the patch. It's now in the upstream obexd tree.

Johan