From bff5b432c2471655409e0560d0df99931d8878c0 Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Mon, 12 Apr 2010 19:34:30 -0300 Subject: [PATCH] obexd: Fix ListPhonebook without a search attribute When looking for a entry in the cache consider that the empty string matches everything. Which is the case when the user doesn't provide a name to search for. --- obexd/plugins/pbap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index 5e06df35f..fa03633d3 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -171,6 +171,9 @@ static gboolean entry_name_find(const struct cache_entry *entry, if (!entry->name) return FALSE; + if (strlen(value) == 0) + return TRUE; + name = g_utf8_strdown(entry->name, -1); ret = (g_strstr_len(name, -1, value) ? TRUE : FALSE); g_free(name); -- 2.47.3