Skip to content

Commit 4efe5d3

Browse files
Thalleynashif
authored andcommitted
samples: Bluetooth: ext_adv_scanner: Fix bad use of adv_type
The adv_type is not a bitfield but was used as such. Changed to do a proper comparison. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 4f152b2 commit 4efe5d3

File tree

1 file changed

+1
-1
lines changed
  • samples/bluetooth/extended_adv/scanner/src

1 file changed

+1
-1
lines changed

samples/bluetooth/extended_adv/scanner/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ BT_CONN_CB_DEFINE(conn_cb) = {
7979

8080
static void scan_recv(const struct bt_le_scan_recv_info *info, struct net_buf_simple *buf)
8181
{
82-
if (info->adv_type & BT_GAP_ADV_TYPE_EXT_ADV &&
82+
if (info->adv_type == BT_GAP_ADV_TYPE_EXT_ADV &&
8383
info->adv_props & BT_GAP_ADV_PROP_EXT_ADV &&
8484
info->adv_props & BT_GAP_ADV_PROP_CONNECTABLE) {
8585
/* Attempt connection request for device with extended advertisements */

0 commit comments

Comments
 (0)