X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-supervision.c;h=6812e00acd6cccf89561d2da747b8e30e6cde77c;hb=775144f839df8e3d37ec1cf52d0f7d3849ac7d46;hp=a7099a4a87a50ee3698bc535f38531c5b3b81e3e;hpb=b8c9d5de384efcfa53ebdb3f0053d7b3723777e1;p=src%2Fapp-framework-binder.git diff --git a/src/afb-supervision.c b/src/afb-supervision.c index a7099a4a..6812e00a 100644 --- a/src/afb-supervision.c +++ b/src/afb-supervision.c @@ -38,6 +38,7 @@ #include "afb-xreq.h" #include "afb-trace.h" #include "afb-session.h" +#include "afb-config.h" #include "afb-supervision.h" #include "afs-supervision.h" #include "afb-stub-ws.h" @@ -45,6 +46,8 @@ #include "verbose.h" #include "wrap-json.h" +extern struct afb_config *main_config; + /* api and apiset name */ static const char supervision_apiname[] = AFS_SURPERVISION_APINAME; @@ -265,8 +268,8 @@ static void slist(void *closure, struct afb_session *session) ******************************************************************************/ static const char *verbs[] = { - "break", "do", "exit", "sclose", "slist", "trace", "wait" }; -enum { Break , Do , Exit , Sclose , Slist , Trace , Wait }; + "break", "config", "do", "exit", "sclose", "slist", "trace", "wait" }; +enum { Break , Config , Do , Exit , Sclose , Slist , Trace , Wait }; static void on_supervision_call(void *closure, struct afb_xreq *xreq) @@ -319,6 +322,9 @@ static void on_supervision_call(void *closure, struct afb_xreq *xreq) afb_session_foreach(slist, list); afb_xreq_success(xreq, list, NULL); break; + case Config: + afb_xreq_success(xreq, afb_config_json(main_config), NULL); + break; case Trace: if (!trace) trace = afb_trace_create(supervision_apiname, NULL /* not bound to any session */);