Skip to contentSkip to conversation

mesh: Fix check for active scan when using generic IO

PATCH Superseded Inga Stotland 1 participant 1 message Oct 16, 2023 Bluetooth drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mesh: Fix check for active scan when using generic IO

This modifies the check for an active scan in generic IO:
the bug has been introduced during earlier code refactoring.

---
 mesh/mesh-io-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mesh/mesh-io-generic.c +1 -1
index 00932ade7..2afe440e7 100644
@@ -781,7 +781,7 @@ static bool recv_register(struct mesh_io *io, const uint8_t *filter,
 	bool already_scanning;
 	bool active = false;
 
-	already_scanning = !l_queue_isempty(io->rx_regs);
+	already_scanning = (l_queue_length(io->rx_regs) > 1);
 
 	/* Look for any AD types requiring Active Scanning */
 	if (l_queue_find(io->rx_regs, find_active, NULL))
Signature · 1 line
2.41.0