Skip to content

Commit

Permalink
TDO: RemoeMe
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviermartin committed Apr 9, 2024
1 parent 3bb3b2b commit db03fc0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dbus/gattlib_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,13 @@ int gattlib_adapter_scan_disable(gattlib_adapter_t* adapter) {
gattlib_handler_free(&adapter->discovered_device_callback);

// Stop BLE scan loop thread
GATTLIB_LOG(GATTLIB_DEBUG, "Is scanning:%d", adapter->backend.ble_scan.is_scanning);
if (adapter->backend.ble_scan.is_scanning) {
adapter->backend.ble_scan.is_scanning = false;
GATTLIB_LOG(GATTLIB_DEBUG, "Will signal end of scanning");
g_mutex_lock(&m_gattlib_signal.mutex);
m_gattlib_signal.signals |= GATTLIB_SIGNAL_ADAPTER_STOP_SCANNING;
GATTLIB_LOG(GATTLIB_DEBUG, "Signalled end of scanning");
g_cond_broadcast(&m_gattlib_signal.condition);
g_mutex_unlock(&m_gattlib_signal.mutex);
}
Expand Down

0 comments on commit db03fc0

Please sign in to comment.