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;