aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/low_can_client.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/low_can_client.cpp b/src/low_can_client.cpp
index c02a71c..e0568e5 100644
--- a/src/low_can_client.cpp
+++ b/src/low_can_client.cpp
@@ -72,12 +72,11 @@ void LowCanClient::initialize() {
HMI_DEBUG("wm:lcc", "subscribe message:%s", json_object_get_string(json_obj));
// Subscribe
- json_object *json_result = json_object_new_object();
- ret = afb_service_call_sync("low-can", "subscribe", json_obj, &json_result);
- if (0 > ret) {
- HMI_INFO("wm:lcc", "Could not subscribe to \"low-can\" :%d", ret);
- }
- HMI_DEBUG("wm:lcc", "subscribe result:%s", json_object_get_string(json_result));
+ afb_service_call("low-can", "subscribe", json_obj,
+ [](void* closure, int status, json_object *result){
+ HMI_DEBUG("wm:lcc", "subscribe result:%s", json_object_get_string(result));
+ },
+ nullptr);
}
return;