File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ int NimBLEScan::handleGapEvent(ble_gap_event* event, void* arg) {
5454 (void )arg;
5555 NimBLEScan* pScan = NimBLEDevice::getScan ();
5656
57- if (!pScan->isScanning ()) {
58- NIMBLE_LOGI (LOG_TAG, " Scan stopped, ignoring event" );
59- return 0 ;
60- }
61-
6257 switch (event->type ) {
6358 case BLE_GAP_EVENT_EXT_DISC:
6459 case BLE_GAP_EVENT_DISC: {
60+ if (!pScan->isScanning ()) {
61+ NIMBLE_LOGI (LOG_TAG, " Scan stopped, ignoring event" );
62+ return 0 ;
63+ }
64+
6565# if CONFIG_BT_NIMBLE_EXT_ADV
6666 const auto & disc = event->ext_disc ;
6767 const bool isLegacyAdv = disc.props & BLE_HCI_ADV_LEGACY_MASK;
@@ -488,11 +488,11 @@ void NimBLEScan::clearResults() {
488488 * @brief Dump the scan results to the log.
489489 */
490490void NimBLEScanResults::dump () const {
491- #if CONFIG_NIMBLE_CPP_LOG_LEVEL >=3
491+ # if CONFIG_NIMBLE_CPP_LOG_LEVEL >= 3
492492 for (const auto & dev : m_deviceVec) {
493493 NIMBLE_LOGI (LOG_TAG, " - %s" , dev->toString ().c_str ());
494494 }
495- #endif
495+ # endif
496496} // dump
497497
498498/* *
You can’t perform that action at this time.
0 commit comments