summaryrefslogtreecommitdiffstats
path: root/src/afb-supervision.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afb-supervision.c')
-rw-r--r--src/afb-supervision.c10
1 files changed, 8 insertions, 2 deletions
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 */);