X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-monitor.c;h=35d0e1505d14c93724a2bb19309ceba8f30c3906;hb=95c29ef579d6320a721f96d7146efd10f74a201b;hp=a0618113039cdb640b54af4ab7ad2c90a99ce222;hpb=e9040472b72ff699964d89dda03ef07ce72b487b;p=src%2Fapp-framework-binder.git diff --git a/src/afb-monitor.c b/src/afb-monitor.c index a0618113..35d0e150 100644 --- a/src/afb-monitor.c +++ b/src/afb-monitor.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include "afb-api.h" #include "afb-apiset.h" @@ -34,10 +34,11 @@ extern struct afb_apiset *main_apiset; +static struct afb_binding_data_v2 datav2; + int afb_monitor_init() { - static int v; - return afb_api_so_v2_add_binding(&_afb_binding_v2_monitor, NULL, main_apiset, &v); + return afb_api_so_v2_add_binding(&_afb_binding_v2_monitor, NULL, main_apiset, &datav2); } /****************************************************************************** @@ -213,6 +214,8 @@ static void get_verbosity(struct json_object *resu, struct json_object *spec) n = json_object_array_length(spec); for (i = 0 ; i < n ; i++) get_verbosity_of(resu, json_object_get_string(json_object_array_get_idx(spec, i))); + } else if (json_object_is_type(spec, json_type_string)) { + get_verbosity_of(resu, json_object_get_string(spec)); } else if (json_object_get_boolean(spec)) { get_verbosity_of(resu, ""); get_verbosity_of(resu, "*"); @@ -274,6 +277,8 @@ static void get_apis(struct json_object *resu, struct json_object *spec) n = json_object_array_length(spec); for (i = 0 ; i < n ; i++) get_one_api(resu, json_object_get_string(json_object_array_get_idx(spec, i)), NULL); + } else if (json_object_is_type(spec, json_type_string)) { + get_one_api(resu, json_object_get_string(spec), NULL); } else if (json_object_get_boolean(spec)) { afb_apiset_enum(main_apiset, get_apis_of_all_cb, resu); }