aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-so-v1.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-20 12:52:23 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-04-20 16:13:59 +0200
commit968c3fca18c7518f240d2487a561e8df8b2907a7 (patch)
tree782af846c36e867a7bd202f6674580f7ab5fdbef /src/afb-api-so-v1.c
parent3634c468ec7de94f6911c532a606625418fa5133 (diff)
cleanup and improvement of xreq
Change-Id: Iefda7f9d8f979a50fb2586a27edf0ca16d056a1f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-so-v1.c')
-rw-r--r--src/afb-api-so-v1.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/afb-api-so-v1.c b/src/afb-api-so-v1.c
index 8c4ea484..5292cfe6 100644
--- a/src/afb-api-so-v1.c
+++ b/src/afb-api-so-v1.c
@@ -69,9 +69,10 @@ static void call_cb(void *closure, struct afb_xreq *xreq)
verb = search(desc, xreq->verb);
if (!verb)
- afb_xreq_fail_f(xreq, "unknown-verb", "verb %s unknown within api %s", xreq->verb, desc->binding->v1.prefix);
+ afb_xreq_fail_unknown_verb(xreq);
else
- afb_xreq_so_call(xreq, verb->session, verb->callback);
+ if (!xreq_session_check_apply(xreq, verb->session))
+ afb_xreq_call(xreq, verb->callback);
}
static int service_start_cb(void *closure, int share_session, int onneed, struct afb_apiset *apiset)