summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-05-20 11:07:27 +0000
committerRobert Pösel <robyer@seznam.cz>2015-05-20 11:07:27 +0000
commit5ce4a9b40179307f4f211b5bf709a4b8747a5eab (patch)
treede06cd94a8edd47cba29a80c3018d3a700b303dd /protocols
parentca5f22ae1dde1832a3857a1ef21273af552b346e (diff)
Steam: Prepare deleting token only when server return code 401
This solves problem of deleting token even if it's still valid but just request got timeout. But it doesn't work yet, because we will got "response == null" as parameter. git-svn-id: http://svn.miranda-ng.org/main/trunk@13714 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Steam/src/steam_account.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/Steam/src/steam_account.cpp b/protocols/Steam/src/steam_account.cpp
index 0cdbc95f80..942095d150 100644
--- a/protocols/Steam/src/steam_account.cpp
+++ b/protocols/Steam/src/steam_account.cpp
@@ -228,9 +228,8 @@ void CSteamProto::OnLoggedOn(const NETLIBHTTPREQUEST *response, void *)
{
if (response == NULL)
{
- // Probably expired TokenSecret
- // FIXME: no response could be also when there is no internet connection available! and in that case it shouldn't delete the token from db...
- HandleTokenExpired();
+ // Probably timeout or no connection, we can do nothing here
+ SetStatus(ID_STATUS_OFFLINE);
return;
}
@@ -238,7 +237,7 @@ void CSteamProto::OnLoggedOn(const NETLIBHTTPREQUEST *response, void *)
JSONNODE *node = json_get(root, "error");
ptrT error(json_as_string(node));
- if (mir_tstrcmpi(error, _T("OK"))/* || response->resultCode == HTTP_STATUS_UNAUTHORIZED*/)
+ if (mir_tstrcmpi(error, _T("OK")) || response->resultCode == HTTP_STATUS_UNAUTHORIZED)
{
// Probably expired TokenSecret
HandleTokenExpired();