diff options
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/clientloop.c b/clientloop.c index 2137a81ce..3b9700aa4 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.c,v 1.262 2015/01/14 20:05:27 djm Exp $ */ | 1 | /* $OpenBSD: clientloop.c,v 1.263 2015/01/19 19:52:16 markus 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 |
@@ -192,9 +192,6 @@ TAILQ_HEAD(global_confirms, global_confirm); | |||
192 | static struct global_confirms global_confirms = | 192 | static struct global_confirms global_confirms = |
193 | TAILQ_HEAD_INITIALIZER(global_confirms); | 193 | TAILQ_HEAD_INITIALIZER(global_confirms); |
194 | 194 | ||
195 | /*XXX*/ | ||
196 | extern Kex *xxx_kex; | ||
197 | |||
198 | void ssh_process_session2_setup(int, int, int, Buffer *); | 195 | void ssh_process_session2_setup(int, int, int, Buffer *); |
199 | 196 | ||
200 | /* Restores stdin to blocking mode. */ | 197 | /* Restores stdin to blocking mode. */ |
@@ -1416,7 +1413,7 @@ static void | |||
1416 | client_process_buffered_input_packets(void) | 1413 | client_process_buffered_input_packets(void) |
1417 | { | 1414 | { |
1418 | dispatch_run(DISPATCH_NONBLOCK, &quit_pending, | 1415 | dispatch_run(DISPATCH_NONBLOCK, &quit_pending, |
1419 | compat20 ? xxx_kex : NULL); | 1416 | compat20 ? active_state->kex : NULL); |
1420 | } | 1417 | } |
1421 | 1418 | ||
1422 | /* scan buf[] for '~' before sending data to the peer */ | 1419 | /* scan buf[] for '~' before sending data to the peer */ |
@@ -1555,7 +1552,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
1555 | if (compat20 && session_closed && !channel_still_open()) | 1552 | if (compat20 && session_closed && !channel_still_open()) |
1556 | break; | 1553 | break; |
1557 | 1554 | ||
1558 | rekeying = (xxx_kex != NULL && !xxx_kex->done); | 1555 | rekeying = (active_state->kex != NULL && !active_state->kex->done); |
1559 | 1556 | ||
1560 | if (rekeying) { | 1557 | if (rekeying) { |
1561 | debug("rekeying in progress"); | 1558 | debug("rekeying in progress"); |
@@ -1599,8 +1596,8 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
1599 | channel_after_select(readset, writeset); | 1596 | channel_after_select(readset, writeset); |
1600 | if (need_rekeying || packet_need_rekeying()) { | 1597 | if (need_rekeying || packet_need_rekeying()) { |
1601 | debug("need rekeying"); | 1598 | debug("need rekeying"); |
1602 | xxx_kex->done = 0; | 1599 | active_state->kex->done = 0; |
1603 | kex_send_kexinit(xxx_kex); | 1600 | kex_send_kexinit(active_state->kex); |
1604 | need_rekeying = 0; | 1601 | need_rekeying = 0; |
1605 | } | 1602 | } |
1606 | } | 1603 | } |
@@ -1729,8 +1726,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
1729 | 1726 | ||
1730 | /* Report bytes transferred, and transfer rates. */ | 1727 | /* Report bytes transferred, and transfer rates. */ |
1731 | total_time = get_current_time() - start_time; | 1728 | total_time = get_current_time() - start_time; |
1732 | packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes); | 1729 | packet_get_bytes(&ibytes, &obytes); |
1733 | packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes); | ||
1734 | verbose("Transferred: sent %llu, received %llu bytes, in %.1f seconds", | 1730 | verbose("Transferred: sent %llu, received %llu bytes, in %.1f seconds", |
1735 | (unsigned long long)obytes, (unsigned long long)ibytes, total_time); | 1731 | (unsigned long long)obytes, (unsigned long long)ibytes, total_time); |
1736 | if (total_time > 0) | 1732 | if (total_time > 0) |