diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-02-22 14:55:24 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-02-22 16:30:01 +0100 |
commit | 393a809105baea0dd694cbac57c11f229d50b6e6 (patch) | |
tree | 977971d613f1cba4716f00a84e469bd171aebbe0 | |
parent | d69f7604c515e211f8021306b5aa51044f927add (diff) |
afb-supervision: Fix error on 'trace'
Change-Id: I81c89e6c9406df583087845d6b38a19fff8ab0eb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r-- | src/afb-supervision.c | 4 | ||||
-rw-r--r-- | src/afb-trace.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/afb-supervision.c b/src/afb-supervision.c index 0f8a16bb..1ff8f8b5 100644 --- a/src/afb-supervision.c +++ b/src/afb-supervision.c @@ -291,7 +291,6 @@ static const char *verbs[] = { "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) { int i, rc; @@ -349,7 +348,8 @@ static void on_supervision_call(void *closure, struct afb_xreq *xreq) if (!trace) trace = afb_trace_create(supervision_apiname, NULL /* not bound to any session */); - req = afb_xreq_unstore((struct afb_stored_req*)xreq); + req = xreq_to_req(xreq); + add = drop = NULL; wrap_json_unpack(args, "{s?o s?o}", "add", &add, "drop", &drop); if (add) { rc = afb_trace_add(req, add, trace); diff --git a/src/afb-trace.c b/src/afb-trace.c index 1fa50ebc..125a9d61 100644 --- a/src/afb-trace.c +++ b/src/afb-trace.c @@ -1401,7 +1401,7 @@ static void add(void *closure, struct json_object *object) struct json_object *request, *event, *daemon, *service, *sub, *global, *session; memcpy (&desc, closure, sizeof desc); - request = event = daemon = service = sub = global = NULL; + request = event = daemon = service = sub = global = session = NULL; rc = wrap_json_unpack(object, "{s?s s?s s?s s?s s?s s?s s?o s?o s?o s?o s?o s?o}", "name", &desc.name, |