svn commit: samba r7483 - in branches/SAMBA_4_0/source/libcli: cldap dgram nbt wins

tridge at samba.org tridge at samba.org
Sat Jun 11 03:53:39 GMT 2005


Author: tridge
Date: 2005-06-11 03:53:39 +0000 (Sat, 11 Jun 2005)
New Revision: 7483

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7483

Log:
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'

Modified:
   branches/SAMBA_4_0/source/libcli/cldap/cldap.c
   branches/SAMBA_4_0/source/libcli/dgram/dgramsocket.c
   branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c
   branches/SAMBA_4_0/source/libcli/wins/winsrepl.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/cldap/cldap.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/cldap/cldap.c	2005-06-11 03:35:28 UTC (rev 7482)
+++ branches/SAMBA_4_0/source/libcli/cldap/cldap.c	2005-06-11 03:53:39 UTC (rev 7483)
@@ -222,7 +222,8 @@
 	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);
 	}
 }

Modified: branches/SAMBA_4_0/source/libcli/dgram/dgramsocket.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/dgram/dgramsocket.c	2005-06-11 03:35:28 UTC (rev 7482)
+++ branches/SAMBA_4_0/source/libcli/dgram/dgramsocket.c	2005-06-11 03:53:39 UTC (rev 7483)
@@ -146,7 +146,8 @@
 							   struct nbt_dgram_socket);
 	if (flags & EVENT_FD_WRITE) {
 		dgm_socket_send(dgmsock);
-	} else if (flags & EVENT_FD_READ) {
+	} 
+	if (flags & EVENT_FD_READ) {
 		dgm_socket_recv(dgmsock);
 	}
 }

Modified: branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c	2005-06-11 03:35:28 UTC (rev 7482)
+++ branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c	2005-06-11 03:53:39 UTC (rev 7483)
@@ -292,7 +292,8 @@
 							  struct nbt_name_socket);
 	if (flags & EVENT_FD_WRITE) {
 		nbt_name_socket_send(nbtsock);
-	} else if (flags & EVENT_FD_READ) {
+	} 
+	if (flags & EVENT_FD_READ) {
 		nbt_name_socket_recv(nbtsock);
 	}
 }

Modified: branches/SAMBA_4_0/source/libcli/wins/winsrepl.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/wins/winsrepl.c	2005-06-11 03:35:28 UTC (rev 7482)
+++ branches/SAMBA_4_0/source/libcli/wins/winsrepl.c	2005-06-11 03:53:39 UTC (rev 7483)
@@ -200,7 +200,6 @@
 							    struct wrepl_socket);
 	if (flags & EVENT_FD_WRITE) {
 		wrepl_handler_send(wrepl_socket);
-		return;
 	}
 	if (flags & EVENT_FD_READ) {
 		wrepl_handler_recv(wrepl_socket);



More information about the samba-cvs mailing list