summaryrefslogtreecommitdiffstats
path: root/libssh/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/server.c')
-rw-r--r--libssh/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh/server.c b/libssh/server.c
index 3db9132..d62e3b3 100644
--- a/libssh/server.c
+++ b/libssh/server.c
@@ -477,7 +477,7 @@ static int dh_handshake_server(ssh_session session) {
}
ssh_string_free(f);
ssh_string_free(sign);
- if (packet_send(session) != SSH_OK) {
+ if (packet_send(session) == SSH_ERROR) {
return -1;
}
@@ -486,7 +486,7 @@ static int dh_handshake_server(ssh_session session) {
return -1;
}
- if (packet_send(session) != SSH_OK) {
+ if (packet_send(session) == SSH_ERROR) {
return -1;
}
ssh_log(session, SSH_LOG_PACKET, "SSH_MSG_NEWKEYS sent");