From 2135970779429089e1569f8d0f0098e6985835a3 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 17 Mar 2010 15:56:37 -0300 Subject: [PATCH] obexd: Fix ListStartOffset handling for PBAP PullPhoneBook function For PBAP PullPhoneBook function the ListStartOffset parameter should be verified to query the contacts considering the offset from the first entry of the Phonebook object. --- obexd/plugins/phonebook-ebook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c index f47d3fdea..c5f681f7a 100644 --- a/obexd/plugins/phonebook-ebook.c +++ b/obexd/plugins/phonebook-ebook.c @@ -65,9 +65,9 @@ static void ebookpull_cb(EBook *book, EBookStatus status, GList *contacts, { struct query_data *data = user_data; GString *string = g_string_new(""); - GList *l; + GList *l = g_list_nth(contacts, data->params->liststartoffset); - for (l = contacts; l; l = g_list_next(l)) { + for (; l; l = g_list_next(l)) { EContact *contact; EVCard *evcard; gchar *vcard; -- 2.47.3