diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2010-04-13 19:32:20 -0300 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2010-05-07 14:25:38 -0300 |
commit | eca27a26a473d72666bb738caa22afbe02ac2bdc (patch) | |
tree | cfa23065927573b156b907a7e253f5018898b0bd | |
parent | 9370ecb3a30bd76d0a33c8d2b26c4365f4d40845 (diff) | |
download | obexd-eca27a26a473d72666bb738caa22afbe02ac2bdc.tar.gz |
Fix PhoneBookSize request for PullPhoneBook function
When MaxListCount is zero, PCE wants to know the number of used indexes
in the phonebook of interest. All other application parameters shall be
ignored.
-rw-r--r-- | plugins/phonebook-ebook.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/phonebook-ebook.c b/plugins/phonebook-ebook.c index 140ca78..153ea95 100644 --- a/plugins/phonebook-ebook.c +++ b/plugins/phonebook-ebook.c @@ -141,7 +141,17 @@ static void ebookpull_cb(EBook *book, EBookStatus estatus, GList *contacts, goto done; } + /* + * When MaxListCount s zero, PCE wants to know the number of used + * indexes in the phonebook of interest. All other parameters that + * may be present in the request shall be ignored. + */ maxcount = data->params->maxlistcount; + if (maxcount == 0) { + count = g_list_length(contacts); + goto done; + } + l = g_list_nth(contacts, data->params->liststartoffset); /* FIXME: Missing 0.vcf */ |