summaryrefslogtreecommitdiffstats
path: root/plugins/lib/bluetooth/hal-bt-data.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-09-11 17:31:26 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:57:27 +0200
commit26e4b4b0d7ccc237fc0102103f9ad9ce8fe5c679 (patch)
tree1376ec0176300f7410630a09f3a6790478781d0e /plugins/lib/bluetooth/hal-bt-data.c
parent26741cc7c9fa1302016d05f936befc7f1b79bfd0 (diff)
Improve Hal-Bt print messages
Improve Hal-Bt print messages by changing the print level of messages, by adding some messages, and by add information for some existing messages. Also improve response of requests. Change-Id: Icf6dc9f4da1a2ee912dda2850464926c68f2eda6 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'plugins/lib/bluetooth/hal-bt-data.c')
-rw-r--r--plugins/lib/bluetooth/hal-bt-data.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/lib/bluetooth/hal-bt-data.c b/plugins/lib/bluetooth/hal-bt-data.c
index cfcb57d..eefd9f1 100644
--- a/plugins/lib/bluetooth/hal-bt-data.c
+++ b/plugins/lib/bluetooth/hal-bt-data.c
@@ -220,15 +220,27 @@ int HalBtDataHandleReceivedSingleBtDeviceData(struct HalBtPluginData *halBtPlugi
if(HalBtDataRemoveSelectedBtDeviceFromList(&halBtPluginData->first, currentBtDevice))
return -3;
- if(halBtPluginData->selectedBtDevice == currentBtDevice)
+ AFB_ApiInfo(halBtPluginData->currentHalApiHandle, "Bluetooth device (address = %s) successfully removed from list", currentBtDeviceAddress);
+
+ if(halBtPluginData->selectedBtDevice == currentBtDevice) {
halBtPluginData->selectedBtDevice = halBtPluginData->first;
+ AFB_ApiDebug(halBtPluginData->currentHalApiHandle,
+ "Bluetooth selected device changed to '%s'",
+ halBtPluginData->selectedBtDevice ? halBtPluginData->selectedBtDevice->address : "none");
+ }
}
else if(! currentBtDevice && currentBtDeviceIsConnected) {
if(! HalBtDataAddBtDeviceToBtDeviceList(&halBtPluginData->first, currentSingleBtDeviceDataJ))
return -4;
- if(! halBtPluginData->selectedBtDevice)
+ AFB_ApiInfo(halBtPluginData->currentHalApiHandle, "Bluetooth device (address = %s) successfully added from list", currentBtDeviceAddress);
+
+ if(! halBtPluginData->selectedBtDevice) {
halBtPluginData->selectedBtDevice = halBtPluginData->first;
+ AFB_ApiDebug(halBtPluginData->currentHalApiHandle,
+ "Bluetooth selected device changed to '%s'",
+ halBtPluginData->selectedBtDevice ? halBtPluginData->selectedBtDevice->address : "none");
+ }
}
return 0;