You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Unauthorized? Also wrong token, or wrong credentials when trying to get the token
268
-
case HTTP_BAD_REQUEST: // OpenSky returns 400 in case of bad credentials when asking for the token...a bit weird, but so it is
269
-
SHOW_MSG(logERR, "%s: Authorization failed! Verify Client Id/Secret in settings.",
270
-
pszChName);
271
-
SetValid(false,false);
272
-
SetEnable(false); // also disable to directly allow user/pwd change...and won't work on retry anyway
273
-
returnfalse;
274
-
268
+
case HTTP_BAD_REQUEST: // OpenSky had returned 400 in case of bad credentials when asking for the token...seems it does no longer, but we handled it still
275
269
case HTTP_UNAUTHORIZED: // OpenSky returns 401 in case of a bad or timed-out token
276
-
LOG_MSG(logERR, "%s: Bad or timed-out access token",
277
-
pszChName);
278
-
ResetStatus(); // let's try with a new one
279
-
IncErrCnt();
280
-
returnfalse;
270
+
if (eState == OPSKY_STATE_GETTING_TOKEN) {
271
+
SHOW_MSG(logERR, "%s: Authorization failed! Verify Client Id/Secret in settings.",
272
+
pszChName);
273
+
SetValid(false,false);
274
+
SetEnable(false); // also disable to directly allow user/pwd change...and won't work on retry anyway
275
+
returnfalse;
276
+
}
277
+
else {
278
+
LOG_MSG(logERR, "%s: Bad or timed-out access token",
0 commit comments