diff options
author | 2017-09-22 07:39:49 +0200 | |
---|---|---|
committer | 2017-10-09 14:08:32 +0200 | |
commit | 39a955678ac5f16646e5841a720d1d358600dabb (patch) | |
tree | 0010dc84e54508eee74efce06d1c420361f47ae5 /src/afb-xreq.c | |
parent | 5928e8fc14c2edabc0bc104fff7542819e06d45a (diff) |
Make addref for request return the pointer
Change-Id: I4286cbd9d02b406570185d265e7b925c43bbc42c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-xreq.c')
-rw-r--r-- | src/afb-xreq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/afb-xreq.c b/src/afb-xreq.c index 8ff45c4e..b091bd1e 100644 --- a/src/afb-xreq.c +++ b/src/afb-xreq.c @@ -396,10 +396,11 @@ static void xreq_context_set_cb(struct afb_request *closure, void *value, void ( afb_context_set(&xreq->context, value, free_value); } -static void xreq_addref_cb(struct afb_request *closure) +static struct afb_request *xreq_addref_cb(struct afb_request *closure) { struct afb_xreq *xreq = from_request(closure); afb_xreq_unhooked_addref(xreq); + return closure; } static void xreq_unref_cb(struct afb_request *closure) @@ -610,11 +611,11 @@ static void xreq_hooked_context_set_cb(struct afb_request *closure, void *value, xreq_context_set_cb(closure, value, free_value); } -static void xreq_hooked_addref_cb(struct afb_request *closure) +static struct afb_request *xreq_hooked_addref_cb(struct afb_request *closure) { struct afb_xreq *xreq = from_request(closure); afb_hook_xreq_addref(xreq); - xreq_addref_cb(closure); + return xreq_addref_cb(closure); } static void xreq_hooked_unref_cb(struct afb_request *closure) |