linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] core/advertising: Fix string match in le adv search
@ 2015-10-06 11:46 Andrejs Hanins
  2015-10-07 13:09 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Andrejs Hanins @ 2015-10-06 11:46 UTC (permalink / raw)
  To: linux-bluetooth

Instead of searching for matched entry in the list, the function match_advertisement
was searching for the first non-matched entry. As a result, it wasn't possible to
unregister existing advertisement from LE Adv manager.

Signed-off-by: Andrejs Hanins <andrejs.hanins@ubnt.com>
---
 src/advertising.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/advertising.c b/src/advertising.c
index d56b7a2..a148625 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -77,10 +77,10 @@ static bool match_advertisement(const void *a, const void *b)
 	const struct advertisement *ad = a;
 	const struct dbus_obj_match *match = b;
 
-	if (match->owner && !g_strcmp0(ad->owner, match->owner))
+	if (match->owner && g_strcmp0(ad->owner, match->owner))
 		return false;
 
-	if (match->path && !g_strcmp0(ad->path, match->path))
+	if (match->path && g_strcmp0(ad->path, match->path))
 		return false;
 
 	return true;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-07 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 11:46 [PATCH] core/advertising: Fix string match in le adv search Andrejs Hanins
2015-10-07 13:09 ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).