From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Fix not responding Not Found for filtered vcard-listing
Date: Fri, 15 Oct 2010 12:45:59 +0300 [thread overview]
Message-ID: <1287135959-6605-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
In this case entries may be found but it still may not match the filter
criteria.
---
plugins/pbap.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/plugins/pbap.c b/plugins/pbap.c
index 13742da..11cb678 100644
--- a/plugins/pbap.c
+++ b/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);
--
1.7.1
next reply other threads:[~2010-10-15 9:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 9:45 Luiz Augusto von Dentz [this message]
2010-10-15 9:58 ` [PATCH] Fix not responding Not Found for filtered vcard-listing Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1287135959-6605-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox