summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-09-10 17:03:14 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:57:27 +0200
commitda774547403c4e448bd94f61ca57e719bc9d5241 (patch)
tree73bbfc83b0888281e0b82296228d88d640b900f2 /plugins
parent0f4af8fa357f8285caf324e04087bbe107a924af (diff)
hal-bt! display error messages of sync calls
Change-Id: I9daa5d665cd727cd26817645e4dd6b987e6f5b05 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/lib/bluetooth/hal-bt.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/lib/bluetooth/hal-bt.c b/plugins/lib/bluetooth/hal-bt.c
index 329cc48..3fcaef2 100644
--- a/plugins/lib/bluetooth/hal-bt.c
+++ b/plugins/lib/bluetooth/hal-bt.c
@@ -136,9 +136,10 @@ CTLP_CAPI(init, source, argsJ, queryJ)
wrap_json_pack(&toSendJ, "{s:s}", "value", BT_MANAGER_DEVICE_UPDATE_EVENT);
if(AFB_ServiceSync(source->api, BT_MANAGER_API, BT_MANAGER_SUBSCRIBE_VERB, toSendJ, &returnedJ)) {
AFB_ApiError(source->api,
- "Error during call to verb '%s' of '%s' api",
+ "Error during call to verb '%s' of '%s' api (%s)",
BT_MANAGER_SUBSCRIBE_VERB,
- BT_MANAGER_API);
+ BT_MANAGER_API,
+ json_object_get_string(returnedJ));
return -6;
}
@@ -153,9 +154,10 @@ CTLP_CAPI(init, source, argsJ, queryJ)
if(AFB_ServiceSync(source->api, BT_MANAGER_API, BT_MANAGER_GET_DEVICES_VERB, NULL, &returnedJ)) {
AFB_ApiError(source->api,
- "Error during call to verb '%s' of '%s' api",
+ "Error during call to verb '%s' of '%s' api (%s)",
BT_MANAGER_GET_DEVICES_VERB,
- BT_MANAGER_API);
+ BT_MANAGER_API,
+ json_object_get_string(returnedJ));
return -7;
}
@@ -219,4 +221,4 @@ CTLP_CAPI(events, source, argsJ, queryJ)
}
return 1;
-} \ No newline at end of file
+}