aboutsummaryrefslogtreecommitdiff
path: root/src/kex.c
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2011-08-05 03:00:21 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-06 11:12:02 +0200
commitaf85337f5ff052437fa5cf117f3d065488640660 (patch)
treeb289a89b4f032b9be811d75a321fef28c29ba0d9 /src/kex.c
parent563fbe4de8ee090b40b50415a86f9a3da16f46b0 (diff)
downloadlibssh-af85337f5ff052437fa5cf117f3d065488640660.tar.gz
libssh-af85337f5ff052437fa5cf117f3d065488640660.tar.xz
libssh-af85337f5ff052437fa5cf117f3d065488640660.zip
session: Fix timeout handling.
-2 now means to use the timeout specified in options. It wasn't used earlier and poll only knows -1 and 0 anyway for special meanings.
Diffstat (limited to 'src/kex.c')
-rw-r--r--src/kex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kex.c b/src/kex.c
index 592ca092..21f2cad6 100644
--- a/src/kex.c
+++ b/src/kex.c
@@ -826,14 +826,14 @@ int ssh_get_kex1(ssh_session session) {
ssh_log(session, SSH_LOG_PROTOCOL, "Waiting for a SSH_SMSG_PUBLIC_KEY");
/* Here the callback is called */
while(session->session_state==SSH_SESSION_STATE_INITIAL_KEX){
- ssh_handle_packets(session,-1);
+ ssh_handle_packets(session, -2);
}
if(session->session_state==SSH_SESSION_STATE_ERROR)
goto error;
ssh_log(session, SSH_LOG_PROTOCOL, "Waiting for a SSH_SMSG_SUCCESS");
/* Waiting for SSH_SMSG_SUCCESS */
while(session->session_state==SSH_SESSION_STATE_KEXINIT_RECEIVED){
- ssh_handle_packets(session,-1);
+ ssh_handle_packets(session, -2);
}
if(session->session_state==SSH_SESSION_STATE_ERROR)
goto error;