Code Review
/
src
/
app-framework-binder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
8bfb43a
)
afb-xreq: handle when no reply was sent
author
José Bollo
<jose.bollo@iot.bzh>
Thu, 10 Aug 2017 09:43:10 +0000
(11:43 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Thu, 10 Aug 2017 09:45:18 +0000
(11:45 +0200)
Send an error reply if no reply was sent.
Change-Id: Ibc5c98d22b9820f1f0b5370083f79a52213ddc61
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-xreq.c
patch
|
blob
|
history
diff --git
a/src/afb-xreq.c
b/src/afb-xreq.c
index
c70e000
..
80dd143
100644
(file)
--- a/
src/afb-xreq.c
+++ b/
src/afb-xreq.c
@@
-49,6
+49,8
@@
static inline void xreq_addref(struct afb_xreq *xreq)
static inline void xreq_unref(struct afb_xreq *xreq)
{
if (!__atomic_sub_fetch(&xreq->refcount, 1, __ATOMIC_RELAXED)) {
+ if (!xreq->replied)
+ afb_xreq_fail(xreq, "error", "no reply");
if (xreq->hookflags)
afb_hook_xreq_end(xreq);
xreq->queryitf->unref(xreq);