auth: Handle request service timeout in blocking mode.

(cherry picked from commit e5e673bafe)
This commit is contained in:
Andreas Schneider
2011-08-26 23:56:49 +02:00
parent b7a3d41baf
commit ac445a1e18

View File

@@ -68,8 +68,13 @@ static int ask_userauth(ssh_session session) {
do {
rc = ssh_service_request(session,"ssh-userauth");
if (ssh_is_blocking(session)) {
if(rc == SSH_AGAIN)
ssh_handle_packets(session, -2);
if (rc == SSH_AGAIN) {
int err = ssh_handle_packets(session, -2);
if (err != SSH_OK) {
/* error or timeout */
return SSH_ERROR;
}
}
} else {
/* nonblocking */
ssh_handle_packets(session, 0);