summaryrefslogtreecommitdiff
path: root/source4/libcli/cldap
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-11 03:53:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:58 -0500
commit07b0d86121cf78e0f7407364240d8eb76bde8d80 (patch)
tree1ae46e0e2afda022e46b0432042c0438338bba6f /source4/libcli/cldap
parent6412e8eeae6b4abfb65514b00c49419a7cb97b1a (diff)
downloadsamba-07b0d86121cf78e0f7407364240d8eb76bde8d80.tar.gz
samba-07b0d86121cf78e0f7407364240d8eb76bde8d80.tar.bz2
samba-07b0d86121cf78e0f7407364240d8eb76bde8d80.zip
r7483: ensure we try reading from a socket if epoll says we can, and don't
just do the write. This is needed because the write could return -1/EAGAIN for dgram sockets, if the socket buffer is nearly full. The epoll loop then goes on forever. This was causing some failures in 'make test' (This used to be commit b7fefe76a2d3c288611868f41d65af4e13ac460b)
Diffstat (limited to 'source4/libcli/cldap')
-rw-r--r--source4/libcli/cldap/cldap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/libcli/cldap/cldap.c b/source4/libcli/cldap/cldap.c
index a96906cf4c..41d5f1a06e 100644
--- a/source4/libcli/cldap/cldap.c
+++ b/source4/libcli/cldap/cldap.c
@@ -222,7 +222,8 @@ static void cldap_socket_handler(struct event_context *ev, struct fd_event *fde,
struct cldap_socket *cldap = talloc_get_type(private, struct cldap_socket);
if (flags & EVENT_FD_WRITE) {
cldap_socket_send(cldap);
- } else if (flags & EVENT_FD_READ) {
+ }
+ if (flags & EVENT_FD_READ) {
cldap_socket_recv(cldap);
}
}