Change-Id: I4286cbd9d02b406570185d265e7b925c43bbc42c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
void *value,
void (*free_value)(void*));
void *value,
void (*free_value)(void*));
+ struct afb_request *(*addref)(
struct afb_request *request);
void (*unref)(
struct afb_request *request);
void (*unref)(
* This function MUST be called by asynchronous implementations
* of verbs if no reply was sent before returning.
*/
* This function MUST be called by asynchronous implementations
* of verbs if no reply was sent before returning.
*/
-static inline void afb_request_addref(struct afb_request *request)
+static inline struct afb_request *afb_request_addref(struct afb_request *request)
- request->itf->addref(request);
+ return request->itf->addref(request);
afb_context_set(&xreq->context, value, free_value);
}
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);
{
struct afb_xreq *xreq = from_request(closure);
afb_xreq_unhooked_addref(xreq);
}
static void xreq_unref_cb(struct afb_request *closure)
}
static void xreq_unref_cb(struct afb_request *closure)
xreq_context_set_cb(closure, value, free_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);
{
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)
}
static void xreq_hooked_unref_cb(struct afb_request *closure)