tevent: Ensure we return after every call to epoll_panic().
authorJeremy Allison <jra@samba.org>
Mon, 11 Feb 2013 18:38:01 +0000 (10:38 -0800)
committerJeremy Allison <jra@samba.org>
Thu, 14 Feb 2013 18:19:38 +0000 (10:19 -0800)
Currently we can't return from this, but the new fallback
code will change this.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/tevent/tevent_epoll.c

index 5f93de2c578af7c5d8f1dad9f38da393909110a7..8e7bc4d26b18941514f92dcd9ab658fa50ba52cf 100644 (file)
@@ -152,6 +152,7 @@ static void epoll_add_event(struct epoll_event_context *epoll_ev, struct tevent_
        event.data.ptr = fde;
        if (epoll_ctl(epoll_ev->epoll_fd, EPOLL_CTL_ADD, fde->fd, &event) != 0) {
                epoll_panic(epoll_ev, "EPOLL_CTL_ADD failed");
+               return;
        }
        fde->additional_flags |= EPOLL_ADDITIONAL_FD_FLAG_HAS_EVENT;
 
@@ -201,6 +202,7 @@ static void epoll_mod_event(struct epoll_event_context *epoll_ev, struct tevent_
        event.data.ptr = fde;
        if (epoll_ctl(epoll_ev->epoll_fd, EPOLL_CTL_MOD, fde->fd, &event) != 0) {
                epoll_panic(epoll_ev, "EPOLL_CTL_MOD failed");
+               return;
        }
 
        /* only if we want to read we want to tell the event handler about errors */