From 79aeffd07b1211308c5f80150837aff3523fe936 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 17 Jul 2021 19:48:24 +0300 Subject: =?UTF-8?q?fixes=20#2934=20(MRA:=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BF=D0=BE=20=D0=BB?= =?UTF-8?q?=D0=BE=D0=B3=D0=B8=D0=BD=D1=83-=D0=BF=D0=B0=D1=80=D0=BE=D0=BB?= =?UTF-8?q?=D1=8E=20=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D0=B5=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/ICQ-WIM/src/server.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'protocols/ICQ-WIM/src/server.cpp') diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 2525482ec7..c650fc2224 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -89,7 +89,16 @@ void CIcqProto::CheckPassword() m_szAToken = getMStringA(DB_KEY_ATOKEN); m_iRClientId = getDword(DB_KEY_RCLIENTID); m_szSessionKey = getMStringA(DB_KEY_SESSIONKEY); - if (m_szAToken.IsEmpty() || m_szSessionKey.IsEmpty()) { + if (!m_szAToken.IsEmpty() && !m_szSessionKey.IsEmpty()) { + StartSession(); + return; + } + + if (m_isMra) { + m_bError462 = false; + SendMrimLogin(nullptr); + } + else { auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_POST, "https://api.login.icq.net/auth/clientLogin", &CIcqProto::OnCheckPassword); pReq << CHAR_PARAM("clientName", "Miranda NG") << CHAR_PARAM("clientVersion", mirVer) << CHAR_PARAM("devId", ICQ_APP_ID) << CHAR_PARAM("f", "json") << CHAR_PARAM("tokenType", "longTerm") << WCHAR_PARAM("s", m_szOwnId) << CHAR_PARAM("pwd", m_szPassword); @@ -98,7 +107,6 @@ void CIcqProto::CheckPassword() #endif Push(pReq); } - else StartSession(); } IcqFileInfo* CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, bool &bIsFile) -- cgit v1.2.3