summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-04 02:35:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:32 -0500
commit567b7a90f6c968bbe09115bb38da9c781c669a50 (patch)
treee0bb1ddfa1babc1d8654f530d265bb7d91fa5efe /source4
parent5da52d3209f6b06a0bedb370b71e2cbe1b3a4c14 (diff)
downloadsamba-567b7a90f6c968bbe09115bb38da9c781c669a50.tar.gz
samba-567b7a90f6c968bbe09115bb38da9c781c669a50.tar.bz2
samba-567b7a90f6c968bbe09115bb38da9c781c669a50.zip
r5217: avoid epoll_ctl() if the event flags are already set correctly
(This used to be commit d89b493aaf690ceb107bd62df75f1bba82284f90)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/events/events.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/events/events.c b/source4/lib/events/events.c
index 3a15172d95..23026166a2 100644
--- a/source4/lib/events/events.c
+++ b/source4/lib/events/events.c
@@ -262,7 +262,10 @@ void event_fd_setflags(struct fd_event *fde, uint16_t flags)
{
#if WITH_EPOLL
struct event_context *ev;
- if (fde == NULL) return;
+ if (fde == NULL ||
+ fde->flags == flags) {
+ return;
+ }
ev = fde->event_ctx;
if (ev->epoll_fd != -1) {
struct epoll_event event;