summaryrefslogtreecommitdiffstats
path: root/plugins/lib/bluetooth
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-09-12 17:48:05 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:57:27 +0200
commitdef67c90db7f49311578a4cc34887b3e65666a27 (patch)
tree4e223755e80c8de0c7d7b57effffe5303a122ec0 /plugins/lib/bluetooth
parent9f88b345bb8e4ccab4f2ab9a20c79802e9f9485e (diff)
Prevent segfault when receiving request in Hal-Bt
Prevent segfault when receiving 'get_connected_bt_a2dp_devices' and 'get_selected_bt_a2dp_device' requests in Hal-Bt plugin. Change-Id: I1eb5dcab997ae77d8adc3cf28585c2449ec42a2e Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'plugins/lib/bluetooth')
-rw-r--r--plugins/lib/bluetooth/hal-bt-cb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/lib/bluetooth/hal-bt-cb.c b/plugins/lib/bluetooth/hal-bt-cb.c
index 82fc2ba..6ac9193 100644
--- a/plugins/lib/bluetooth/hal-bt-cb.c
+++ b/plugins/lib/bluetooth/hal-bt-cb.c
@@ -117,7 +117,7 @@ void HalBtGetA2DPBluetoothDevices(AFB_ReqT request)
while(currentBtDeviceData) {
wrap_json_pack(&currentBtDeviceObjectJ,
- "{s:s s:s s:s s:b}",
+ "{s:s s:s s:s}",
"Interface", currentBtDeviceData->hci,
"Name", currentBtDeviceData->name,
"Address", currentBtDeviceData->address);
@@ -146,7 +146,7 @@ void HalBtGetSelectedA2DPBluetoothDevice(AFB_ReqT request)
}
wrap_json_pack(&selectedBtDeviceObject,
- "{s:s s:s s:s s:b}",
+ "{s:s s:s s:s}",
"Interface", localHalBtPluginData->selectedBtDevice->hci,
"Name", localHalBtPluginData->selectedBtDevice->name,
"Address", localHalBtPluginData->selectedBtDevice->address);