summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-10-06 18:47:08 +0200
committerJeremy Allison <jra@samba.org>2010-10-06 23:40:24 +0000
commit1c9b85667070ee3292862d007f03b33b10713edd (patch)
tree955abe0a9ba462f920bf4cc3083d5a3b06dc04e6
parent0cec0f0912bc0cc15715fd68483f28e5b68e4439 (diff)
downloadsamba-1c9b85667070ee3292862d007f03b33b10713edd.tar.gz
samba-1c9b85667070ee3292862d007f03b33b10713edd.tar.bz2
samba-1c9b85667070ee3292862d007f03b33b10713edd.zip
tevent: Only call handlers that ask for events
The s3 libsmbclient puts two different handlers on a single fd for readability and writability. With select this works fine, however without this patch we unconditionally call the write handler even if the socket is only readable. We should have called the read handler instead. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Oct 6 23:40:24 UTC 2010 on sn-devel-104
-rw-r--r--lib/tevent/tevent_standard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tevent/tevent_standard.c b/lib/tevent/tevent_standard.c
index 1c8ed0e6ac..a68a03c2ac 100644
--- a/lib/tevent/tevent_standard.c
+++ b/lib/tevent/tevent_standard.c
@@ -505,7 +505,7 @@ static int std_event_loop_select(struct std_event_context *std_ev, struct timeva
if (FD_ISSET(fde->fd, &r_fds)) flags |= TEVENT_FD_READ;
if (FD_ISSET(fde->fd, &w_fds)) flags |= TEVENT_FD_WRITE;
- if (flags) {
+ if (flags & fde->flags) {
fde->handler(std_ev->ev, fde, flags, fde->private_data);
break;
}