X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-evt.c;h=96366de69318fd4ca257e0018d1f0188e13cff46;hb=271bb6fc606fc5068a7b7a8f22b0052aca2fb900;hp=2bac0837923782a99e6b8275c331fdbc39fca0cc;hpb=34fa1fb6de1c449b81b9a19fda21c2963eb57f3f;p=src%2Fapp-framework-binder.git diff --git a/src/afb-evt.c b/src/afb-evt.c index 2bac0837..96366de6 100644 --- a/src/afb-evt.c +++ b/src/afb-evt.c @@ -108,23 +108,22 @@ struct afb_evt_watch { unsigned activity; }; -/* declare functions */ -static void evt_hooked_drop(struct afb_evtid *evtid); - /* the interface for events */ static struct afb_event_itf afb_evt_event_itf = { .broadcast = (void*)afb_evt_evtid_broadcast, .push = (void*)afb_evt_evtid_push, - .drop = (void*)afb_evt_evtid_unref, - .name = (void*)afb_evt_evtid_name + .unref = (void*)afb_evt_evtid_unref, + .name = (void*)afb_evt_evtid_name, + .addref = (void*)afb_evt_evtid_addref }; /* the interface for events */ static struct afb_event_itf afb_evt_hooked_event_itf = { .broadcast = (void*)afb_evt_evtid_hooked_broadcast, .push = (void*)afb_evt_evtid_hooked_push, - .drop = (void*)evt_hooked_drop, - .name = (void*)afb_evt_evtid_hooked_name + .unref = (void*)afb_evt_evtid_hooked_unref, + .name = (void*)afb_evt_evtid_hooked_name, + .addref = (void*)afb_evt_evtid_hooked_addref }; /* head of the list of listeners */ @@ -406,10 +405,6 @@ void afb_evt_evtid_unref(struct afb_evtid *evtid) pthread_mutex_unlock(&listener->mutex); } - /* hook */ - if (evtid->hookflags & afb_hook_flag_evt_drop) - afb_hook_evt_drop(evtid->fullname, evtid->id); - /* free */ pthread_mutex_destroy(&evtid->mutex); free(evtid); @@ -428,13 +423,6 @@ void afb_evt_evtid_hooked_unref(struct afb_evtid *evtid) afb_evt_evtid_unref(evtid); } -static void evt_hooked_drop(struct afb_evtid *evtid) -{ - if (evtid->hookflags & afb_hook_flag_evt_drop) - afb_hook_evt_drop(evtid->fullname, evtid->id); - afb_evt_evtid_unref(evtid); -} - /* * Returns the true name of the 'event' */