From ddd83295ad239ecbc95103148ed06d54d571b40d Mon Sep 17 00:00:00 2001 From: Andrejs Hanins Date: Tue, 6 Oct 2015 14:46:47 +0300 Subject: [PATCH] core/advertising: Fix string match in le adv search 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. --- src/advertising.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/advertising.c b/src/advertising.c index d56b7a248..a1486254c 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; -- 2.47.3