simplify ev_handle_events on linux

Sun, 02 Jun 2024 16:32:39 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 02 Jun 2024 16:32:39 +0200
changeset 533
2d6099ba2a7c
parent 532
d8212d4f24f2
child 534
bf62eddbdb9b

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

mercurial