diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | serverloop.c | 14 |
2 files changed, 14 insertions, 5 deletions
@@ -110,6 +110,9 @@ | |||
110 | [channels.c nchan.c] | 110 | [channels.c nchan.c] |
111 | replace buffer_consume(b, buffer_len(b)) with buffer_clear(b); | 111 | replace buffer_consume(b, buffer_len(b)) with buffer_clear(b); |
112 | ok provos@ | 112 | ok provos@ |
113 | - markus@cvs.openbsd.org 2002/01/10 11:13:29 | ||
114 | [serverloop.c] | ||
115 | skip client_alive_check until there are channels; ok beck@ | ||
113 | 116 | ||
114 | 117 | ||
115 | 20020121 | 118 | 20020121 |
@@ -7258,4 +7261,4 @@ | |||
7258 | - Wrote replacements for strlcpy and mkdtemp | 7261 | - Wrote replacements for strlcpy and mkdtemp |
7259 | - Released 1.0pre1 | 7262 | - Released 1.0pre1 |
7260 | 7263 | ||
7261 | $Id: ChangeLog,v 1.1754 2002/01/22 12:21:15 djm Exp $ | 7264 | $Id: ChangeLog,v 1.1755 2002/01/22 12:21:39 djm Exp $ |
diff --git a/serverloop.c b/serverloop.c index 0c75b05c9..39d992057 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: serverloop.c,v 1.93 2001/12/28 15:06:00 markus Exp $"); | 38 | RCSID("$OpenBSD: serverloop.c,v 1.94 2002/01/10 11:13:29 markus Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "packet.h" | 41 | #include "packet.h" |
@@ -209,15 +209,21 @@ make_packets_from_stdout_data(void) | |||
209 | static void | 209 | static void |
210 | client_alive_check(void) | 210 | client_alive_check(void) |
211 | { | 211 | { |
212 | static int had_channel = 0; | ||
212 | int id; | 213 | int id; |
213 | 214 | ||
215 | id = channel_find_open(); | ||
216 | if (id == -1) { | ||
217 | if (!had_channel) | ||
218 | return; | ||
219 | packet_disconnect("No open channels after timeout!"); | ||
220 | } | ||
221 | had_channel = 1; | ||
222 | |||
214 | /* timeout, check to see how many we have had */ | 223 | /* timeout, check to see how many we have had */ |
215 | if (++client_alive_timeouts > options.client_alive_count_max) | 224 | if (++client_alive_timeouts > options.client_alive_count_max) |
216 | packet_disconnect("Timeout, your session not responding."); | 225 | packet_disconnect("Timeout, your session not responding."); |
217 | 226 | ||
218 | id = channel_find_open(); | ||
219 | if (id == -1) | ||
220 | packet_disconnect("No open channels after timeout!"); | ||
221 | /* | 227 | /* |
222 | * send a bogus channel request with "wantreply", | 228 | * send a bogus channel request with "wantreply", |
223 | * we should get back a failure | 229 | * we should get back a failure |