summaryrefslogtreecommitdiff
path: root/imap/src/c-client/auth_bea.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/c-client/auth_bea.c')
-rw-r--r--imap/src/c-client/auth_bea.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/imap/src/c-client/auth_bea.c b/imap/src/c-client/auth_bea.c
index 2273b413..1db020a4 100644
--- a/imap/src/c-client/auth_bea.c
+++ b/imap/src/c-client/auth_bea.c
@@ -138,13 +138,9 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder
}
/* empty challenge or user requested abort or client does not have info */
- if(!oauth2.access_token) {
- if (base){
- (*responder) (stream,base,"",strlen(base));
- if ((challenge = (*challenger) (stream,&clen)) != NULL)
- fs_give ((void **) &challenge);
- }
- (*responder) (stream,NIL,NIL,0);
+ if(tryanother || !oauth2.access_token) {
+ if (!base)
+ (*responder) (stream,NIL,NIL,0);
*trial = 0; /* cancel subsequent attempts */
ret = LONGT; /* will get a BAD response back */
}
@@ -196,7 +192,7 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder
fs_give ((void **) &response);
}
}
- if (!ret || !oauth2.name || tryanother)
+ if (!ret || !oauth2.name)
*trial = 65535; /* don't retry if bad protocol */
return ret;
}