From 2e28322a0f0be14e674fe37778df7ecc7e54aa7b Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 23 Jun 2010 12:39:56 +0300 Subject: [PATCH] obexd: Make sure vcards attributes are in the same order as mentioned in the spec Some carkits (nokia ck-600) seems to be picky about the ordering of the attributes so that they have to be as mentioned in the spec: vCard 2.1 order VERSION, N and TEL vCard 3.0 order VERSION, N,FN and TEL --- obexd/plugins/vcard.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/obexd/plugins/vcard.c b/obexd/plugins/vcard.c index d56133d07..5948a4a8f 100644 --- a/obexd/plugins/vcard.c +++ b/obexd/plugins/vcard.c @@ -273,6 +273,12 @@ void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact, vcard_printf_begin(vcards, format); + if (filter & FILTER_N) + vcard_printf_name(vcards, contact); + + if (filter & FILTER_FN) + vcard_printf_fullname(vcards, contact->fullname); + if (filter & FILTER_TEL) { GSList *l; @@ -284,12 +290,6 @@ void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact, } } - if (filter & FILTER_N) - vcard_printf_name(vcards, contact); - - if (filter & FILTER_FN) - vcard_printf_fullname(vcards, contact->fullname); - if (filter & FILTER_EMAIL) vcard_printf_email(vcards, contact->email); -- 2.47.3