summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-15 03:12:08 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-02-15 03:12:08 +0000
commitf9452513fcf92be881809006ce3c210805d5f2ad (patch)
tree7422ff5a747a6183001292786a74b36adc9453b4 /clientloop.c
parentd8a9021f3652d8ab99d0fed2460420c3eb4e10a2 (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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/clientloop.c b/clientloop.c
index e892c1ab..547ccabf 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.49 2001/02/08 19:30:51 itojun Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.51 2001/02/13 21:51:09 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -406,6 +406,15 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
if (select((*maxfdp)+1, *readsetp, *writesetp, NULL, NULL) < 0) {
char buf[100];
+
+ /*
+ * We have to clear the select masks, because we return.
+ * We have to return, because the mainloop checks for the flags
+ * set by the signal handlers.
+ */
+ memset(*readsetp, 0, *maxfdp);
+ memset(*writesetp, 0, *maxfdp);
+
if (errno == EINTR)
return;
/* Note: we might still have data in the buffers. */