summaryrefslogtreecommitdiffstats
path: root/plugins/lib/bluetooth/hal-bt-mixer-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/lib/bluetooth/hal-bt-mixer-link.c')
-rw-r--r--plugins/lib/bluetooth/hal-bt-mixer-link.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/plugins/lib/bluetooth/hal-bt-mixer-link.c b/plugins/lib/bluetooth/hal-bt-mixer-link.c
index 865d63d..714c4e8 100644
--- a/plugins/lib/bluetooth/hal-bt-mixer-link.c
+++ b/plugins/lib/bluetooth/hal-bt-mixer-link.c
@@ -40,12 +40,17 @@ int HalBtMixerLinkSetBtStreamingSettings(AFB_ApiT apiHandle, char *mixerApiName,
if(! apiHandle || ! mixerApiName)
return -1;
- if(! btStreamStatus)
+ if(! btStreamStatus) {
+ AFB_ApiDebug(apiHandle, "Will try to disable bluetooth streamed device");
toSendJ = NULL;
- else if(btStreamStatus == 1 && hci && btAddress)
+ }
+ else if(btStreamStatus == 1 && hci && btAddress) {
+ AFB_ApiDebug(apiHandle, "Will try to change bluetooth streamed device to hci='%s' address='%s'", hci, btAddress);
wrap_json_pack(&toSendJ, "{s:s s:s s:s}", "interface", hci, "device", btAddress, "profile", "a2dp");
- else
- return -3;
+ }
+ else {
+ return -2;
+ }
if(AFB_ServiceSync(apiHandle, mixerApiName, MIXER_SET_STREAMED_BT_DEVICE_VERB, toSendJ, &returnedJ)) {
AFB_ApiError(apiHandle,
@@ -63,5 +68,10 @@ int HalBtMixerLinkSetBtStreamingSettings(AFB_ApiT apiHandle, char *mixerApiName,
return -4;
}
+ if(btStreamStatus)
+ AFB_ApiInfo(apiHandle, "Bluetooth streamed device changed to hci='%s' address='%s'", hci, btAddress);
+ else
+ AFB_ApiInfo(apiHandle, "Bluetooth streamed device disbaled");
+
return 0;
} \ No newline at end of file