summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-05-19 18:51:12 +0000
committerRobert Pösel <robyer@seznam.cz>2015-05-19 18:51:12 +0000
commit12e166b13c3b60836c19cd4625ba8a02e423fc53 (patch)
tree0307caa2cfbaa6dd4d11cefe9f46d6ec05d72828
parent867fce85e3d993662eb07af5376e178e4c0a2e45 (diff)
Steam: Fix disconnecting on incorrect login and always show error popup (but login itself still doesn't work)
git-svn-id: http://svn.miranda-ng.org/main/trunk@13699 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Steam/src/steam_account.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/protocols/Steam/src/steam_account.cpp b/protocols/Steam/src/steam_account.cpp
index cc6652910d..e20c1f51e2 100644
--- a/protocols/Steam/src/steam_account.cpp
+++ b/protocols/Steam/src/steam_account.cpp
@@ -87,9 +87,13 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *)
{
node = json_get(root, "message");
ptrT message(json_as_string(node));
- if (!lstrcmpi(message, L"Incorrect login"))
+
+ // Always show error notification
+ ShowNotification(TranslateTS(message));
+
+ if (!mir_tstrcmpi(message, _T("Incorrect login.")))
{
- ShowNotification(TranslateTS(message));
+ // We can't continue with incorrect login/password
SetStatus(ID_STATUS_OFFLINE);
return;
}
@@ -232,8 +236,8 @@ void CSteamProto::OnLoggedOn(const NETLIBHTTPREQUEST *response, void *)
JSONROOT root(response->pData);
JSONNODE *node = json_get(root, "error");
- ptrW error(json_as_string(node));
- if (lstrcmpi(error, L"OK")/* || response->resultCode == HTTP_STATUS_UNAUTHORIZED*/)
+ ptrT error(json_as_string(node));
+ if (mir_tstrcmpi(error, _T("OK"))/* || response->resultCode == HTTP_STATUS_UNAUTHORIZED*/)
{
// Probably expired TokenSecret
HandleTokenExpired();