summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-09-11 15:05:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:39 -0500
commit4490c816a90871cd93b1a709bae91e5176e4f599 (patch)
treed8598582cfce464bbe031ba97920ae58b61818aa
parentd987a32c8c95c745e059c5bd9c1530d29b19f2dc (diff)
downloadsamba-4490c816a90871cd93b1a709bae91e5176e4f599.tar.gz
samba-4490c816a90871cd93b1a709bae91e5176e4f599.tar.bz2
samba-4490c816a90871cd93b1a709bae91e5176e4f599.zip
r2283: 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 (This used to be commit 553b529a0991ccf2f1be14cc6a27695223f02e65)
-rw-r--r--source4/lib/events.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/lib/events.c b/source4/lib/events.c
index 9affaf1246..06d956a014 100644
--- a/source4/lib/events.c
+++ b/source4/lib/events.c
@@ -310,7 +310,7 @@ void event_loop_exit(struct event_context *ev, int code)
/*
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 @@ void event_loop_once(struct event_context *ev)
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 @@ void event_loop_once(struct event_context *ev)
}
te = next;
}
+
+ return 0;
}
/*
@@ -459,7 +461,9 @@ int event_loop_wait(struct event_context *ev)
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;