summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-03-07 19:02:43 +0000
committerDamien Miller <djm@mindrot.org>2016-03-08 06:20:35 +1100
commit95767262caa6692eff1e1565be1f5cb297949a89 (patch)
tree1055360a328d0998dabb966f2e1002389f8c6c41 /serverloop.c
parentaf0bb38ffd1f2c4f9f43b0029be2efe922815255 (diff)
upstream commit
refactor canohost.c: move functions that cache results closer to the places that use them (authn and session code). After this, no state is cached in canohost.c feedback and ok markus@ Upstream-ID: 5f2e4df88d4803fc8ec59ec53629105e23ce625e
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/serverloop.c b/serverloop.c
index e6a92476f..f9e3e5d14 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.183 2016/03/04 03:35:44 djm Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.184 2016/03/07 19:02:43 djm 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
@@ -395,6 +395,7 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
395static void 395static void
396process_input(fd_set *readset) 396process_input(fd_set *readset)
397{ 397{
398 struct ssh *ssh = active_state; /* XXX */
398 int len; 399 int len;
399 char buf[16384]; 400 char buf[16384];
400 401
@@ -402,8 +403,8 @@ process_input(fd_set *readset)
402 if (FD_ISSET(connection_in, readset)) { 403 if (FD_ISSET(connection_in, readset)) {
403 len = read(connection_in, buf, sizeof(buf)); 404 len = read(connection_in, buf, sizeof(buf));
404 if (len == 0) { 405 if (len == 0) {
405 verbose("Connection closed by %.100s", 406 verbose("Connection closed by %.100s port %d",
406 get_remote_ipaddr()); 407 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
407 connection_closed = 1; 408 connection_closed = 1;
408 if (compat20) 409 if (compat20)
409 return; 410 return;
@@ -412,8 +413,9 @@ process_input(fd_set *readset)
412 if (errno != EINTR && errno != EAGAIN && 413 if (errno != EINTR && errno != EAGAIN &&
413 errno != EWOULDBLOCK) { 414 errno != EWOULDBLOCK) {
414 verbose("Read error from remote host " 415 verbose("Read error from remote host "
415 "%.100s: %.100s", 416 "%.100s port %d: %.100s",
416 get_remote_ipaddr(), strerror(errno)); 417 ssh_remote_ipaddr(ssh),
418 ssh_remote_port(ssh), strerror(errno));
417 cleanup_exit(255); 419 cleanup_exit(255);
418 } 420 }
419 } else { 421 } else {