diff options
author | Lukasz Pawlik <lucas.pawlik@gmail.com> | 2010-11-10 12:43:07 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-11-11 11:28:40 +0200 |
commit | 0085bbb9cf1d113cc5190f1ee277c1dfb15b5dd3 (patch) | |
tree | 472b236c1d0e0f74147de1eeccd21d60f469ffa3 | |
parent | 4763bda0f2b647c7b2d2d3706f1babe589671fd0 (diff) | |
download | obexd-0085bbb9cf1d113cc5190f1ee277c1dfb15b5dd3.tar.gz |
Fix pull phonebook reply if filter not set
According to the PBAP specification if filter is not set or is set to
0x00000000 in the application parameters header all attributes of the vCard
should be returned. Previously only mandatory attributes were returned in
phonebook pull reply. This patch fix this and now all currently supported
vCards attributes will be returned.
-rw-r--r-- | plugins/vcard.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/vcard.c b/plugins/vcard.c index 41f9fbd..3f69189 100644 --- a/plugins/vcard.c +++ b/plugins/vcard.c @@ -457,10 +457,16 @@ static void vcard_printf_end(GString *vcards) void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact, uint64_t filter, uint8_t format) { - if (format == FORMAT_VCARD30) + if (format == FORMAT_VCARD30 && filter) filter |= (FILTER_VERSION | FILTER_FN | FILTER_N | FILTER_TEL); - else if (format == FORMAT_VCARD21) + else if (format == FORMAT_VCARD21 && filter) filter |= (FILTER_VERSION | FILTER_N | FILTER_TEL); + else + filter = (FILTER_VERSION | FILTER_UID | FILTER_N | FILTER_FN | + FILTER_TEL | FILTER_EMAIL | FILTER_ADR | + FILTER_BDAY | FILTER_NICKNAME | FILTER_URL | + FILTER_PHOTO | FILTER_ORG | FILTER_ROLE | + FILTER_TITLE | FILTER_X_IRMC_CALL_DATETIME); vcard_printf_begin(vcards, format); |