X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-supervision.c;h=b6af92ca7a1c910bbb33a1c0e5015630ce246db0;hb=043c27c3a8fd323d59e41288b6fd24f0e9bfa9a3;hp=2482a082029a1b27c05be79ab666b979426bf9c0;hpb=93d8d6f69399dacbb43c0780ebccc378b4f44880;p=src%2Fapp-framework-binder.git diff --git a/src/afb-supervision.c b/src/afb-supervision.c index 2482a082..b6af92ca 100644 --- a/src/afb-supervision.c +++ b/src/afb-supervision.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"); @@ -64,7 +64,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* the standard apiset */ static struct { struct afb_apiset *apiset; - struct afb_config *config; + struct json_object *config; } global; /* the supervision apiset (not exported) */ @@ -212,7 +212,7 @@ static void try_connect_supervisor() ERROR("Creation of supervisor failed: %m"); goto end; } - afb_stub_ws_on_hangup(supervisor, on_supervisor_hangup); + afb_stub_ws_set_on_hangup(supervisor, on_supervisor_hangup); /* successful termination */ goto end; @@ -238,7 +238,7 @@ static void on_sighup(int signum) /** * initialize the supervision */ -int afb_supervision_init(struct afb_apiset *apiset, struct afb_config *config) +int afb_supervision_init(struct afb_apiset *apiset, struct json_object *config) { int rc; struct sigaction sa; @@ -351,7 +351,7 @@ static void on_supervision_call(void *closure, struct afb_xreq *xreq) afb_xreq_reply(xreq, list, NULL, NULL); break; case Config: - afb_xreq_reply(xreq, afb_config_json(global.config), NULL, NULL); + afb_xreq_reply(xreq, json_object_get(global.config), NULL, NULL); break; case Trace: if (!trace)