summaryrefslogtreecommitdiffstats
path: root/src/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auth.c')
-rw-r--r--src/auth.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/auth.c b/src/auth.c
index 0af4ccc0..af699918 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -62,23 +62,23 @@
* again is necessary
*/
static int ask_userauth(ssh_session session) {
- int rc = 0;
-
- enter_function();
- do {
- rc=ssh_service_request(session,"ssh-userauth");
- if(ssh_is_blocking(session)){
- if(rc==SSH_AGAIN)
- ssh_handle_packets(session,-1);
- } else {
- /* nonblocking */
- ssh_handle_packets(session,0);
- rc=ssh_service_request(session,"ssh-userauth");
- break;
- }
- } while(rc==SSH_AGAIN);
- leave_function();
- return rc;
+ int rc = 0;
+
+ enter_function();
+ do {
+ rc = ssh_service_request(session,"ssh-userauth");
+ if (ssh_is_blocking(session)) {
+ if(rc == SSH_AGAIN)
+ ssh_handle_packets(session, -2);
+ } else {
+ /* nonblocking */
+ ssh_handle_packets(session, 0);
+ rc = ssh_service_request(session, "ssh-userauth");
+ break;
+ }
+ } while (rc == SSH_AGAIN);
+ leave_function();
+ return rc;
}
/**