diff --git a/src/auth.c b/src/auth.c index fb70cd2a..f56bad34 100644 --- a/src/auth.c +++ b/src/auth.c @@ -88,24 +88,15 @@ static int ssh_userauth_request_service(ssh_session session) return rc; } -static int auth_status_termination(void *user) { - ssh_session session = (ssh_session) user; - - switch(session->auth_state) { +static int auth_status_termination(void *user){ + ssh_session session=(ssh_session)user; + switch(session->auth_state){ case SSH_AUTH_STATE_NONE: case SSH_AUTH_STATE_KBDINT_SENT: return 0; - case SSH_AUTH_STATE_PARTIAL: - case SSH_AUTH_STATE_SUCCESS: - case SSH_AUTH_STATE_INFO: - case SSH_AUTH_STATE_FAILED: - case SSH_AUTH_STATE_ERROR: - case SSH_AUTH_STATE_PK_OK: + default: return 1; } - - /* should never been reached */ - return 1; } /** @@ -317,17 +308,6 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_pk_ok){ return rc; } -static int auth_status_termination(void *user){ - ssh_session session=(ssh_session)user; - switch(session->auth_state){ - case SSH_AUTH_STATE_NONE: - case SSH_AUTH_STATE_KBDINT_SENT: - return 0; - default: - return 1; - } -} - /** * @brief Get available authentication methods from the server. * diff --git a/src/channels.c b/src/channels.c index 6925978b..94010a24 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1241,7 +1241,7 @@ int channel_write_common(ssh_channel channel, const void *data, #ifdef WITH_SSH1 if (channel->version == 1) { - int rc = channel_write1(channel, data, len); + rc = channel_write1(channel, data, len); leave_function(); return rc; }