summaryrefslogtreecommitdiffstats
path: root/libssh/auth1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/auth1.c')
-rw-r--r--libssh/auth1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh/auth1.c b/libssh/auth1.c
index 100e0c8..06f0549 100644
--- a/libssh/auth1.c
+++ b/libssh/auth1.c
@@ -101,7 +101,7 @@ static int send_username(ssh_session session, const char *username) {
}
ssh_string_free(user);
session->auth_state=SSH_AUTH_STATE_NONE;
- if (packet_send(session) != SSH_OK) {
+ if (packet_send(session) == SSH_ERROR) {
return SSH_AUTH_ERROR;
}
@@ -193,7 +193,7 @@ int ssh_userauth1_password(ssh_session session, const char *username,
ssh_string_burn(pwd);
ssh_string_free(pwd);
session->auth_state=SSH_AUTH_STATE_NONE;
- if (packet_send(session) != SSH_OK) {
+ if (packet_send(session) == SSH_ERROR) {
leave_function();
return SSH_AUTH_ERROR;
}