aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-export.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-20 12:19:24 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-09 14:08:31 +0200
commit770ca7e254bba07bb7d1ade4fa95afed7a7f7693 (patch)
tree0e8b0d4500ac6c481620ec45892d3f0c5d424287 /src/afb-export.c
parentdd4c9c11ba5e1f9068ddd20e06db6dca067f01b9 (diff)
afb-xreq: hide internal addref/unref to xreqs
Change-Id: Ie175ec1e508c7bd3bcdc25d7e0b26e7a9da3fafb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-export.c')
-rw-r--r--src/afb-export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-export.c b/src/afb-export.c
index 70a63774..dc9cbd96 100644
--- a/src/afb-export.c
+++ b/src/afb-export.c
@@ -551,12 +551,12 @@ static int svc_call_sync(void *closure, const char *api, const char *verb, struc
callreq->result = NULL;
callreq->status = 0;
callreq->async = 0;
- afb_xreq_addref(&callreq->xreq);
+ afb_xreq_unhooked_addref(&callreq->xreq); /* avoid early callreq destruction */
rc = jobs_enter(NULL, 0, callreq_sync_enter, callreq);
if (rc >= 0)
rc = callreq->status;
resu = (rc >= 0 || callreq->result) ? callreq->result : afb_msg_json_internal_error();
- afb_xreq_unref(&callreq->xreq);
+ afb_xreq_unhooked_unref(&callreq->xreq);
}
if (result)
*result = resu;