2010-07-27 19:04:26

by Marcel Mol

[permalink] [raw]
Subject: [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(-)

diff --git a/plugins/phonebook-ebook.c b/plugins/phonebook-ebook.c
index 2d5bec3..089b956 100644
--- a/plugins/phonebook-ebook.c
+++ b/plugins/phonebook-ebook.c
@@ -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++) {
--
1.7.1.1



2010-08-02 19:45:06

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH 1/2] Fix vcard filter setting

Hi,

On Tue, Jul 27, 2010, Marcel Mol wrote:
> 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