diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-05-13 02:16:34 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-05-13 02:16:34 -0600 |
commit | 00c4ef9e0d4bc4d1ea210e7a0d31494b4116bb4a (patch) | |
tree | a45ced362cdacee4559153b9d9bd68130ab9b7a7 /imap/src/c-client/auth_bea.c | |
parent | 1a2261b89b700ae5d73bb82a7b581d7d30012f90 (diff) | |
download | alpine-00c4ef9e0d4bc4d1ea210e7a0d31494b4116bb4a.tar.xz |
* Avoid error messages or tcp timeouts when cancelling imap authentication.
Diffstat (limited to 'imap/src/c-client/auth_bea.c')
-rw-r--r-- | imap/src/c-client/auth_bea.c | 12 |
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; } |