svn commit: samba r2283 - in branches/SAMBA_4_0/source/lib: .

abartlet at samba.org abartlet at samba.org
Sat Sep 11 15:05:49 GMT 2004


Author: abartlet
Date: 2004-09-11 15:05:49 +0000 (Sat, 11 Sep 2004)
New Revision: 2283

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/lib&rev=2283&nolog=1

Log:
Change from tridge (in his ntlm2 patch).

I think the idea here is to bail out correctly when we get signing
broken on TCP, rather than keeping on hammering the socket.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/events.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/events.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events.c	2004-09-11 15:04:40 UTC (rev 2282)
+++ branches/SAMBA_4_0/source/lib/events.c	2004-09-11 15:05:49 UTC (rev 2283)
@@ -310,7 +310,7 @@
 /*
   do a single event loop using the events defined in ev this function
 */
-void event_loop_once(struct event_context *ev)
+int event_loop_once(struct event_context *ev)
 {
 	time_t t;
 	fd_set r_fds, w_fds;
@@ -404,7 +404,7 @@
 			   the event, so this must be a bug. This is a
 			   fatal error. */
 			DEBUG(0,("EBADF on event_loop_once - exiting\n"));
-			return;
+			return -1;
 		}
 		
 		if (selrtn > 0) {
@@ -442,6 +442,8 @@
 		}
 		te = next;
 	}		
+	
+	return 0;
 }
 
 /*
@@ -459,7 +461,9 @@
 	ev->exit.exit_now = False;
 
 	while (ev->fd_events && !ev->exit.exit_now) {
-		event_loop_once(ev);
+		if (event_loop_once(ev) != 0) {
+			break;
+		}
 	}
 
 	return ev->exit.code;



More information about the samba-cvs mailing list