diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-14 09:37:22 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-14 09:37:22 +0000 |
commit | 4174577db3e4c6ae3dce7bf78f0f96462463cf85 (patch) | |
tree | ee9e23583e1d91c65dcec7ab7a94c644d1a88c5a /libssh/kex.c | |
parent | 6ec84bfc2eb9922e83876a4352859dfcc4850efa (diff) | |
download | libssh-4174577db3e4c6ae3dce7bf78f0f96462463cf85.tar.gz libssh-4174577db3e4c6ae3dce7bf78f0f96462463cf85.tar.xz libssh-4174577db3e4c6ae3dce7bf78f0f96462463cf85.zip |
Use consistend return values for packet_wait() functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@462 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/kex.c')
-rw-r--r-- | libssh/kex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/kex.c b/libssh/kex.c index a0dae95c..1ff85c64 100644 --- a/libssh/kex.c +++ b/libssh/kex.c @@ -236,7 +236,7 @@ int ssh_get_kex(SSH_SESSION *session, int server_kex) { enter_function(); - if (packet_wait(session, SSH2_MSG_KEXINIT, 1)) { + if (packet_wait(session, SSH2_MSG_KEXINIT, 1) != SSH_OK) { leave_function(); return -1; } @@ -624,7 +624,7 @@ int ssh_get_kex1(SSH_SESSION *session) { enter_function(); ssh_log(session, SSH_LOG_PROTOCOL, "Waiting for a SSH_SMSG_PUBLIC_KEY"); - if (packet_wait(session, SSH_SMSG_PUBLIC_KEY, 1)) { + if (packet_wait(session, SSH_SMSG_PUBLIC_KEY, 1) != SSH_OK) { leave_function(); return -1; } @@ -760,7 +760,7 @@ int ssh_get_kex1(SSH_SESSION *session) { session->next_crypto = NULL; ssh_log(session, SSH_LOG_PROTOCOL, "Waiting for a SSH_SMSG_SUCCESS"); - if (packet_wait(session,SSH_SMSG_SUCCESS,1)) { + if (packet_wait(session,SSH_SMSG_SUCCESS,1) != SSH_OK) { char buffer[1024] = {0}; snprintf(buffer, sizeof(buffer), "Key exchange failed: %s", ssh_get_error(session)); |