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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/imap/src/c-client/auth_bea.c b/imap/src/c-client/auth_bea.c
index d9f5e067..4b001ac7 100644
--- a/imap/src/c-client/auth_bea.c
+++ b/imap/src/c-client/auth_bea.c
@@ -109,7 +109,7 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder
if (!base)
(*responder) (stream,NIL,NIL,0);
*trial = 0; /* cancel subsequent attempts */
- ret = LONGT; /* will get a BAD response back */
+ ret = base ? NIL : LONGT; /* will get a BAD response back */
}
else {
char ports[10];
@@ -145,12 +145,12 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder
}
}
fs_give ((void **) &response);
+ if (!ret)
+ *trial = 65535; /* don't retry if bad protocol */
}
}
if(oauth2.param[OA2_Id].value) fs_give((void **) &oauth2.param[OA2_Id].value);
if(oauth2.param[OA2_Secret].value) fs_give((void **) &oauth2.param[OA2_Secret].value);
if(oauth2.param[OA2_Tenant].value) fs_give((void **) &oauth2.param[OA2_Tenant].value);
- if (!ret)
- *trial = 65535; /* don't retry if bad protocol */
return ret;
}