X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-ditf.c;h=66136760b0865ccf180aa81f6bec49b4b4b00ec1;hb=c6380108964e71f533d8c672bb9c217020a95e8d;hp=b5a50930b4b6d2e7adbb2d6adf81073837f75cee;hpb=d3c80685ed6067f4899635c0328bbd8b70a2ed90;p=src%2Fapp-framework-binder.git diff --git a/src/afb-ditf.c b/src/afb-ditf.c index b5a50930..66136760 100644 --- a/src/afb-ditf.c +++ b/src/afb-ditf.c @@ -29,6 +29,7 @@ #include "afb-ditf.h" #include "afb-evt.h" #include "afb-common.h" +#include "afb-xreq.h" #include "afb-hook.h" #include "jobs.h" #include "verbose.h" @@ -100,6 +101,11 @@ static int queue_job_cb(void *closure, void (*callback)(int signum, void *arg), return jobs_queue(group, timeout, callback, argument); } +static struct afb_req unstore_req_cb(void *closure, struct afb_stored_req *sreq) +{ + return afb_xreq_unstore(sreq); +} + /********************************************** * hooked flow **********************************************/ @@ -179,6 +185,16 @@ static int hooked_queue_job_cb(void *closure, void (*callback)(int signum, void return afb_hook_ditf_queue_job(ditf, callback, argument, group, timeout, r); } +static struct afb_req hooked_unstore_req_cb(void *closure, struct afb_stored_req *sreq) +{ + struct afb_ditf *ditf = closure; + afb_hook_ditf_unstore_req(ditf, sreq); + return unstore_req_cb(closure, sreq); +} + +/********************************************** +* vectors +**********************************************/ static const struct afb_daemon_itf daemon_itf = { .vverbose_v1 = old_vverbose_cb, .vverbose_v2 = vverbose_cb, @@ -189,7 +205,8 @@ static const struct afb_daemon_itf daemon_itf = { .get_system_bus = afb_common_get_system_bus, .rootdir_get_fd = afb_common_rootdir_get_fd, .rootdir_open_locale = rootdir_open_locale_cb, - .queue_job = queue_job_cb + .queue_job = queue_job_cb, + .unstore_req = unstore_req_cb }; static const struct afb_daemon_itf hooked_daemon_itf = { @@ -202,7 +219,8 @@ static const struct afb_daemon_itf hooked_daemon_itf = { .get_system_bus = hooked_get_system_bus, .rootdir_get_fd = hooked_rootdir_get_fd, .rootdir_open_locale = hooked_rootdir_open_locale_cb, - .queue_job = hooked_queue_job_cb + .queue_job = hooked_queue_job_cb, + .unstore_req = hooked_unstore_req_cb }; void afb_ditf_init_v2(struct afb_ditf *ditf, const char *api, struct afb_binding_data_v2 *data)