X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-monitor.c;h=15dd1a495fc6aa638c17c31633597e592c447a84;hb=a2cf84ecde926adeebf09bc2c284401513d3fab3;hp=a50e2c65f4ea660442edb9f8adc80f83c4e6331b;hpb=4521c1e7ae5371ab9d639adc617d17fb4e8ded0c;p=src%2Fapp-framework-binder.git diff --git a/src/afb-monitor.c b/src/afb-monitor.c index a50e2c65..15dd1a49 100644 --- a/src/afb-monitor.c +++ b/src/afb-monitor.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017, 2018 "IoT.bzh" + * Copyright (C) 2016-2019 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -218,7 +218,7 @@ static struct json_object *get_verbosity(struct json_object *spec) json_object_iter_next(&it); } } else if (json_object_is_type(spec, json_type_array)) { - n = json_object_array_length(spec); + n = (int)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)) { @@ -280,7 +280,7 @@ static struct json_object *get_apis(struct json_object *spec) json_object_iter_next(&it); } } else if (json_object_is_type(spec, json_type_array)) { - n = json_object_array_length(spec); + n = (int)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)) { @@ -326,6 +326,7 @@ static void f_set(afb_req_t req) afb_req_success(req, NULL, NULL); } +#if WITH_AFB_TRACE static void *context_create(void *closure) { return afb_trace_create(_afb_binding_monitor.api, NULL); @@ -360,7 +361,14 @@ static void f_trace(afb_req_t req) end: afb_apiset_update_hooks(target_set, NULL); afb_evt_update_hooks(); + return; } +#else +static void f_trace(afb_req_t req) +{ + afb_req_reply(req, NULL, "not-available", NULL); +} +#endif static void f_session(afb_req_t req) {