File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,19 +119,19 @@ int NimBLEScan::handleGapEvent(ble_gap_event* event, void* arg) {
119
119
}
120
120
121
121
if (!advertisedDevice->m_callbackSent ) {
122
- pScan->m_pScanCallbacks ->onDiscovered (advertisedDevice);
123
122
advertisedDevice->m_callbackSent ++;
123
+ pScan->m_pScanCallbacks ->onDiscovered (advertisedDevice);
124
124
}
125
125
126
126
// If not active scanning or scan response is not available
127
127
// or extended advertisement scanning, report the result to the callback now.
128
128
if (pScan->m_scanParams .passive || !isLegacyAdv || !advertisedDevice->isScannable ()) {
129
- pScan->m_pScanCallbacks ->onResult (advertisedDevice);
130
129
advertisedDevice->m_callbackSent ++;
130
+ pScan->m_pScanCallbacks ->onResult (advertisedDevice);
131
131
} else if (isLegacyAdv && event_type == BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP) {
132
+ advertisedDevice->m_callbackSent ++;
132
133
// got the scan response report the full data.
133
134
pScan->m_pScanCallbacks ->onResult (advertisedDevice);
134
- advertisedDevice->m_callbackSent ++;
135
135
}
136
136
137
137
// If not storing results and we have invoked the callback, delete the device.
You can’t perform that action at this time.
0 commit comments