From da774547403c4e448bd94f61ca57e719bc9d5241 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Mon, 10 Sep 2018 17:03:14 +0200 Subject: hal-bt! display error messages of sync calls Change-Id: I9daa5d665cd727cd26817645e4dd6b987e6f5b05 Signed-off-by: Thierry Bultel --- plugins/lib/bluetooth/hal-bt.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'plugins') 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 +} -- cgit 1.2.3-korg