X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-monitor.c;h=4bedc49ddc3c048529468128b404c979c3c3026a;hb=48b1901a094efa5f9d387c55175320cdaeb165ad;hp=7524d24eac3fc824c2d153419041210d79beda8b;hpb=4ecf37c1899349e6ef7ac08813ebb52fc80b2677;p=src%2Fapp-framework-binder.git diff --git a/src/afb-monitor.c b/src/afb-monitor.c index 7524d24e..4bedc49d 100644 --- a/src/afb-monitor.c +++ b/src/afb-monitor.c @@ -239,14 +239,10 @@ static struct json_object *get_verbosity(struct json_object *spec) static void get_one_api(struct json_object *resu, const char *name, struct json_object *spec) { struct json_object *o; - struct afb_api api; - int rc; - rc = afb_apiset_lookup(main_apiset, name, &api); - if (!rc) { - o = api.itf->describe ? api.itf->describe(api.closure) : NULL; + o = afb_apiset_describe(main_apiset, name); + if (o || afb_apiset_has(main_apiset, name)) json_object_object_add(resu, name, o); - } } /** @@ -349,13 +345,15 @@ static void f_trace(struct afb_req req) if (add) { rc = afb_trace_add(req, add, trace); if (rc) - return; + goto end; } if (drop) { rc = afb_trace_drop(req, drop, trace); if (rc) - return; + goto end; } afb_req_success(req, NULL, NULL); +end: + afb_apiset_update_hooks(main_apiset, NULL); }