Skip to content

Commit 934e111

Browse files
fix advertising report not terminating early for unwanted reports
1 parent 2c90611 commit 934e111

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

connectivity/FEATURE_BLE/source/generic/GapImpl.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2658,10 +2658,9 @@ void Gap::signal_advertising_report(
26582658
delete _connect_to_host_resolved_address_parameters;
26592659
_connect_to_host_resolved_address_parameters = nullptr;
26602660
}
2661-
} else {
2662-
_event_handler->onAdvertisingReport(
2663-
event
2664-
);
2661+
2662+
/* do not report it as this was a scan run for connection purposes */
2663+
return;
26652664
}
26662665
} else {
26672666
/* check if there already is a RPA like that in the list of other pending reports */
@@ -2687,6 +2686,9 @@ void Gap::signal_advertising_report(
26872686
}
26882687
}
26892688
}
2689+
2690+
/* we need to wait until the address is resolved before reporting it */
2691+
return;
26902692
}
26912693
#else
26922694
/* filter out unresolved address if at least one bond exists */

0 commit comments

Comments
 (0)