All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@arri.de>
To: <linux-bluetooth@vger.kernel.org>
Cc: Christian Eggers <ceggers@arri.de>
Subject: [PATCH BlueZ v2 2/9] advertising: parse_secondary: fix mask value
Date: Fri, 23 Sep 2022 16:55:55 +0200	[thread overview]
Message-ID: <20220923145602.25872-3-ceggers@arri.de> (raw)
In-Reply-To: <20220923145602.25872-1-ceggers@arri.de>

It looks like a wrong mask value is used here as only the bits mentioned
in adv_secondary::flag can be set again within the loop.

Replace magic number by preprocessor macro.
---
 src/advertising.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/advertising.c b/src/advertising.c
index 15ef44def031..42ac627604fe 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -1051,7 +1051,7 @@ static bool parse_secondary(DBusMessageIter *iter,
 		return false;
 
 	/* Reset secondary channels before parsing */
-	client->flags &= 0xfe00;
+	client->flags &= ~MGMT_ADV_FLAG_SEC_MASK;
 
 	dbus_message_iter_get_basic(iter, &str);
 
-- 
2.35.3


  parent reply	other threads:[~2022-09-23 14:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 14:55 [PATCH BlueZ v2 0/9] properties_changed: check for NULL iterator Christian Eggers
2022-09-23 14:55 ` [PATCH BlueZ v2 1/9] advertising: parse_secondary: fix loop condition Christian Eggers
2022-09-23 15:47   ` properties_changed: check for NULL iterator bluez.test.bot
2022-09-29 16:49   ` bluez.test.bot
2022-09-29 17:45   ` bluez.test.bot
2022-09-29 18:40   ` bluez.test.bot
2022-09-29 19:01   ` bluez.test.bot
2022-09-29 19:29   ` bluez.test.bot
2022-09-29 19:47   ` bluez.test.bot
2022-09-29 20:34   ` bluez.test.bot
2022-09-29 20:53   ` bluez.test.bot
2022-09-29 21:30   ` bluez.test.bot
2022-09-29 21:52   ` bluez.test.bot
2022-09-29 22:32   ` bluez.test.bot
2022-09-29 22:52   ` bluez.test.bot
2022-09-29 23:40   ` bluez.test.bot
2022-09-29 23:59   ` bluez.test.bot
2022-09-23 14:55 ` Christian Eggers [this message]
2022-09-23 14:55 ` [PATCH BlueZ v2 3/9] advertising: parse_secondary: " Christian Eggers
2022-09-23 14:55 ` [PATCH BlueZ v2 4/9] advertising: parse_min_interval: reset min_interval if iter is NULL Christian Eggers
2022-09-23 14:57 ` [PATCH BlueZ v2 5/9] advertising: parse_[min|max]_interval: reset value " Christian Eggers
2022-09-23 14:58 ` [PATCH BlueZ v2 6/9] advertising: parse_tx_power: " Christian Eggers
2022-09-23 14:58   ` [PATCH BlueZ v2 7/9] client/gatt: proxy_property_changed: check for NULL iterator Christian Eggers
2022-09-23 14:58   ` [PATCH BlueZ v2 8/9] gatt: " Christian Eggers
2022-09-23 14:58   ` [PATCH BlueZ v2 9/9] battery: provided_battery_property_changed_cb: check iterator Christian Eggers
2022-09-23 19:18 ` [PATCH BlueZ v2 0/9] properties_changed: check for NULL iterator Luiz Augusto von Dentz
2022-09-23 20:50 ` patchwork-bot+bluetooth

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=20220923145602.25872-3-ceggers@arri.de \
    --to=ceggers@arri.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.