-/* destroy all events */
-static void client_drop_all_events(struct afb_stub_ws *stubws)
-{
- struct client_event *ev, *nxt;
-
- nxt = __atomic_exchange_n(&stubws->events, NULL, __ATOMIC_RELAXED);
- while (nxt) {
- ev = nxt;
- nxt = ev->next;
- afb_evt_event_x2_unref(ev->event);
- free(ev);
- }
-}
-
-/* search the event */
-static struct client_event *client_event_search(struct afb_stub_ws *stubws, uint32_t eventid, const char *name)
-{
- struct client_event *ev;
-
- ev = stubws->events;
- while (ev != NULL && (ev->id != eventid || 0 != strcmp(afb_evt_event_x2_fullname(ev->event), name)))
- ev = ev->next;
-
- DEBUG("searching event %s[%d]: %s", name, eventid, ev ? "found" : "not found");
- return ev;
-}
-