From 14f09b2e657f746c4831d27ec2736e2a03d80067 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 15 Oct 2010 12:45:59 +0300 Subject: [PATCH] obexd: Fix not responding Not Found for filtered vcard-listing In this case entries may be found but it still may not match the filter criteria. --- obexd/plugins/pbap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index 13742da6a..11cb6789c 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -398,12 +398,6 @@ static void cache_ready_notify(void *user_data) goto done; } - if (pbap->cache.entries == NULL) { - pbap->cache.valid = TRUE; - obex_object_set_io_flags(pbap, G_IO_ERR, -ENOENT); - return; - } - /* * Don't free the sorted list content: this list contains * only the reference for the "real" cache entry. @@ -412,6 +406,12 @@ static void cache_ready_notify(void *user_data) pbap->params->searchattrib, (const char *) pbap->params->searchval); + if (sorted == NULL) { + pbap->cache.valid = TRUE; + obex_object_set_io_flags(pbap, G_IO_ERR, -ENOENT); + return; + } + /* Computing offset considering first entry of the phonebook */ l = g_slist_nth(sorted, pbap->params->liststartoffset); -- 2.47.3