summaryrefslogtreecommitdiffstats
path: root/src/afb-config.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-05-30 16:28:55 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-05-30 16:28:55 +0200
commitbb5806063c450da26a38e1915f076723d00df260 (patch)
tree1503c2a4dc0558bc87f82bec6f6490d4a495a028 /src/afb-config.c
parent52384789f904e7ebbfb901e15cc62521c9b9468f (diff)
Adds hooks for service (svc)
Change-Id: I42265fcee9eae8219ef0cf56d3c8446d2c0fc015 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-config.c')
-rw-r--r--src/afb-config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/afb-config.c b/src/afb-config.c
index 80dde93f..ebacee99 100644
--- a/src/afb-config.c
+++ b/src/afb-config.c
@@ -91,6 +91,7 @@
#define DISPLAY_HELP 'h'
#define SET_QUIET 'q'
#define SET_RNDTOKEN 'r'
+#define SET_TRACESVC 'S'
#define SET_TRACEREQ 'T'
#define SET_AUTH_TOKEN 't'
#define SET_UPLOAD_DIR 'u'
@@ -152,6 +153,7 @@ static AFB_options cliOptions[] = {
{SET_TRACEREQ, 1, "tracereq", "Log the requests: no, common, extra, all"},
{SET_TRACEDITF, 1, "traceditf", "Log the requests: no, common, extra, all"},
+ {SET_TRACESVC, 1, "tracesvc", "Log the requests: no, all"},
{ADD_CALL, 1, "call", "call at start format of val: API/VERB:json-args"},
{SET_NO_HTTPD, 0, "no-httpd", "Forbids HTTP service"},
@@ -184,6 +186,12 @@ static struct enumdesc traceditf_desc[] = {
{ NULL, 0 }
};
+static struct enumdesc tracesvc_desc[] = {
+ { "no", 0 },
+ { "all", afb_hook_flags_svc_all },
+ { NULL, 0 }
+};
+
static struct enumdesc mode_desc[] = {
{ "local", AFB_MODE_LOCAL },
{ "remote", AFB_MODE_REMOTE },
@@ -506,6 +514,10 @@ static void parse_arguments(int argc, char **argv, struct afb_config *config)
config->traceditf = argvalenum(optc, traceditf_desc);
break;
+ case SET_TRACESVC:
+ config->tracesvc = argvalenum(optc, tracesvc_desc);
+ break;
+
case SET_NO_HTTPD:
noarg(optc);
config->noHttpd = 1;