summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-02-11 10:38:01 -0800
committerJeremy Allison <jra@samba.org>2013-02-14 10:19:38 -0800
commit129da06d2d9c9d1cedc5e4de492744b29adc1684 (patch)
tree0cf56cccbd20629ed7e6b5f9f42dfce0598b2269 /lib
parentc36f8c14008e55b2be2e93c0987eb6971d45855f (diff)
downloadsamba-129da06d2d9c9d1cedc5e4de492744b29adc1684.tar.gz
samba-129da06d2d9c9d1cedc5e4de492744b29adc1684.tar.bz2
samba-129da06d2d9c9d1cedc5e4de492744b29adc1684.zip
tevent: Ensure we return after every call to epoll_panic().
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent_epoll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c
index 5f93de2c57..8e7bc4d26b 100644
--- a/lib/tevent/tevent_epoll.c
+++ b/lib/tevent/tevent_epoll.c
@@ -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 */