diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-15 03:12:08 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-15 03:12:08 +0000 |
commit | f9452513fcf92be881809006ce3c210805d5f2ad (patch) | |
tree | 7422ff5a747a6183001292786a74b36adc9453b4 /clientloop.c | |
parent | d8a9021f3652d8ab99d0fed2460420c3eb4e10a2 (diff) |
- deraadt@cvs.openbsd.org 2001/02/12 22:56:09
[clientloop.c packet.c ssh-keyscan.c]
deal with EAGAIN/EINTR selects which were skipped
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clientloop.c b/clientloop.c index e892c1abd..547ccabfe 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -59,7 +59,7 @@ | |||
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include "includes.h" | 61 | #include "includes.h" |
62 | RCSID("$OpenBSD: clientloop.c,v 1.49 2001/02/08 19:30:51 itojun Exp $"); | 62 | RCSID("$OpenBSD: clientloop.c,v 1.51 2001/02/13 21:51:09 markus Exp $"); |
63 | 63 | ||
64 | #include "ssh.h" | 64 | #include "ssh.h" |
65 | #include "ssh1.h" | 65 | #include "ssh1.h" |
@@ -406,6 +406,15 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, | |||
406 | 406 | ||
407 | if (select((*maxfdp)+1, *readsetp, *writesetp, NULL, NULL) < 0) { | 407 | if (select((*maxfdp)+1, *readsetp, *writesetp, NULL, NULL) < 0) { |
408 | char buf[100]; | 408 | char buf[100]; |
409 | |||
410 | /* | ||
411 | * We have to clear the select masks, because we return. | ||
412 | * We have to return, because the mainloop checks for the flags | ||
413 | * set by the signal handlers. | ||
414 | */ | ||
415 | memset(*readsetp, 0, *maxfdp); | ||
416 | memset(*writesetp, 0, *maxfdp); | ||
417 | |||
409 | if (errno == EINTR) | 418 | if (errno == EINTR) |
410 | return; | 419 | return; |
411 | /* Note: we might still have data in the buffers. */ | 420 | /* Note: we might still have data in the buffers. */ |