diff options
author | 2017-09-22 09:37:54 +0200 | |
---|---|---|
committer | 2017-10-09 14:08:32 +0200 | |
commit | be63003e3f1841b43614f0e11b0a291e11f1dad1 (patch) | |
tree | 58bfc359398ccdb3a5976f3204ee17f535f15569 /src/afb-xreq.c | |
parent | 59d4e6a0654d361de19fbbfa65daf6c1dabd55a0 (diff) |
Provide conversions for afb_event and afb_req
Provision is made here to convert, trivially:
afb_event -> afb_eventid*
afb_req -> afb_request*
The opposite conversions aren't provided to
favor new interfaces.
Change-Id: Ib67c2317f782e2edfd1ba0e49e10b321a3b770a3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-xreq.c')
-rw-r--r-- | src/afb-xreq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/afb-xreq.c b/src/afb-xreq.c index ed5f30b0..f9f2324a 100644 --- a/src/afb-xreq.c +++ b/src/afb-xreq.c @@ -424,7 +424,7 @@ static int xreq_session_set_LOA_cb(struct afb_request *closure, unsigned level) static int xreq_subscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid); static int xreq_subscribe_cb(struct afb_request *closure, struct afb_event event) { - return xreq_subscribe_eventid_cb(closure, event.closure); + return xreq_subscribe_eventid_cb(closure, afb_event_to_eventid(event)); } static int xreq_subscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid) @@ -447,7 +447,7 @@ int afb_xreq_subscribe(struct afb_xreq *xreq, struct afb_eventid *eventid) static int xreq_unsubscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid); static int xreq_unsubscribe_cb(struct afb_request *closure, struct afb_event event) { - return xreq_unsubscribe_eventid_cb(closure, event.closure); + return xreq_unsubscribe_eventid_cb(closure, afb_event_to_eventid(event)); } static int xreq_unsubscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid) @@ -642,7 +642,7 @@ static int xreq_hooked_session_set_LOA_cb(struct afb_request *closure, unsigned static int xreq_hooked_subscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid); static int xreq_hooked_subscribe_cb(struct afb_request *closure, struct afb_event event) { - return xreq_hooked_subscribe_eventid_cb(closure, event.closure); + return xreq_hooked_subscribe_eventid_cb(closure, afb_event_to_eventid(event)); } static int xreq_hooked_subscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid) @@ -655,7 +655,7 @@ static int xreq_hooked_subscribe_eventid_cb(struct afb_request *closure, struct static int xreq_hooked_unsubscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid); static int xreq_hooked_unsubscribe_cb(struct afb_request *closure, struct afb_event event) { - return xreq_hooked_unsubscribe_eventid_cb(closure, event.closure); + return xreq_hooked_unsubscribe_eventid_cb(closure, afb_event_to_eventid(event)); } static int xreq_hooked_unsubscribe_eventid_cb(struct afb_request *closure, struct afb_eventid *eventid) |