summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-06-21 18:53:53 +1000
committerDarren Tucker <dtucker@zip.com.au>2009-06-21 18:53:53 +1000
commitc5564e1c4c41ae9af96973e2996e2a4285acbae8 (patch)
treef9fae51c40975704cc73af6073914b00821e3009 /clientloop.c
parent1cc55d7a607455d75db0204b5acebce47667b0f8 (diff)
- andreas@cvs.openbsd.org 2009/05/28 16:50:16
[sshd.c packet.c serverloop.c monitor_wrap.c clientloop.c sshconnect.c monitor.c Added roaming.h roaming_common.c roaming_dummy.c] Keep track of number of bytes read and written. Needed for upcoming changes. Most code from Martin Forssen, maf at appgate dot com. ok markus@ Also, applied appropriate changes to Makefile.in
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/clientloop.c b/clientloop.c
index d5a06556a..43f001bc4 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.211 2009/05/27 06:33:39 andreas Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.212 2009/05/28 16:50:16 andreas Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -109,6 +109,7 @@
109#include "misc.h" 109#include "misc.h"
110#include "match.h" 110#include "match.h"
111#include "msg.h" 111#include "msg.h"
112#include "roaming.h"
112 113
113/* import options */ 114/* import options */
114extern Options options; 115extern Options options;
@@ -634,7 +635,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
634static void 635static void
635client_process_net_input(fd_set *readset) 636client_process_net_input(fd_set *readset)
636{ 637{
637 int len; 638 int len, cont = 0;
638 char buf[8192]; 639 char buf[8192];
639 640
640 /* 641 /*
@@ -643,8 +644,8 @@ client_process_net_input(fd_set *readset)
643 */ 644 */
644 if (FD_ISSET(connection_in, readset)) { 645 if (FD_ISSET(connection_in, readset)) {
645 /* Read as much as possible. */ 646 /* Read as much as possible. */
646 len = read(connection_in, buf, sizeof(buf)); 647 len = roaming_read(connection_in, buf, sizeof(buf), &cont);
647 if (len == 0) { 648 if (len == 0 && cont == 0) {
648 /* 649 /*
649 * Received EOF. The remote host has closed the 650 * Received EOF. The remote host has closed the
650 * connection. 651 * connection.