# HG changeset patch
# User Olaf Wintermann <olaf.wintermann@gmail.com>
# Date 1717338759 -7200
# Node ID 2d6099ba2a7c8037c9da86589c761c69ef155d38
# Parent  d8212d4f24f20945a7bd8177458714d2ad8b6456
simplify ev_handle_events on linux

diff -r d8212d4f24f2 -r 2d6099ba2a7c src/server/daemon/event_linux.c
--- 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