More logging

pull/277/head
Olivier Martin 2024-04-08 12:32:46 +02:00
parent 4acf4aa0ab
commit 5406a97e57
2 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,8 @@ static gpointer _gattlib_connected_device_thread(gpointer data) {
g_rec_mutex_lock(&m_gattlib_mutex);
if (!gattlib_connection_is_connected(connection)) {
GATTLIB_LOG(GATTLIB_ERROR, "_gattlib_connected_device_thread: Device is not connected");
GATTLIB_LOG(GATTLIB_ERROR, "_gattlib_connected_device_thread: Device is not connected (state:%s)",
device_state_str[connection->device->state]);
g_rec_mutex_unlock(&m_gattlib_mutex);
return NULL;
}

View File

@ -687,6 +687,7 @@ int gattlib_adapter_close(gattlib_adapter_t* adapter) {
GATTLIB_LOG(GATTLIB_DEBUG, "Close bluetooth adapter %s", adapter->name);
if (adapter->backend.ble_scan.is_scanning) {
GATTLIB_LOG(GATTLIB_DEBUG, "Bluetooth adapter %s was scanning. We stop the scan", adapter->name);
gattlib_adapter_scan_disable(adapter);
_wait_scan_loop_stop_scanning(adapter);