diff options
author | Vinicius Costa Gomes <vcgomes@gmail.com> | 2010-05-12 15:12:17 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-05-14 15:59:23 +0300 |
commit | 2ae8db23f036e3294be3fdca87a0b7c94fd82471 (patch) | |
tree | 501cc1e60d3799238053cb2d6c32039aed2eea76 | |
parent | 3fd4aa58522a4eb0254c01506495573559fad293 (diff) | |
download | obexd-2ae8db23f036e3294be3fdca87a0b7c94fd82471.tar.gz |
Fix owner vCard not having the first handle
The spec mandates that the owner vCard must have handle 0.vcf.
-rw-r--r-- | plugins/phonebook-tracker.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c index 894d781..a8cbb45 100644 --- a/plugins/phonebook-tracker.c +++ b/plugins/phonebook-tracker.c @@ -519,8 +519,13 @@ static void add_to_cache(char **reply, int num_fields, void *user_data) formatted = g_strdup_printf("%s;%s;%s;%s;%s", reply[1], reply[2], reply[3], reply[4], reply[5]); - cache->entry_cb(reply[0], PHONEBOOK_INVALID_HANDLE, formatted, "", + /* The owner vCard must have the 0 handle */ + if (strcmp(reply[0], TRACKER_DEFAULT_CONTACT_ME) == 0) + cache->entry_cb(reply[0], 0, formatted, "", reply[6], cache->user_data); + else + cache->entry_cb(reply[0], PHONEBOOK_INVALID_HANDLE, formatted, + "", reply[6], cache->user_data); g_free(formatted); |