Sun, 02 Jun 2024 16:32:39 +0200
simplify ev_handle_events on linux
src/server/daemon/event_linux.c | file | annotate | diff | comparison | revisions |
--- a/src/server/daemon/event_linux.c Sun Jun 02 16:02:36 2024 +0200 +++ b/src/server/daemon/event_linux.c Sun Jun 02 16:32:39 2024 +0200 @@ -118,13 +118,18 @@ if(ebufpos == sizeof(Event*)) { intptr_t *p = (intptr_t*)b; *(&event) = (Event*)*p; + /* if(event->fn) { if(!event->fn(ev, event) && event->finish) { event->finish(ev, event); } - } - } - } else if(event->fn) { + }*/ + } else { + continue; // should not happen + } + } + + if(event->fn) { int saved_ev = event->events; if(!event->fn(ev, event)) { // event fn returned 0 -> remove event from epoll