summaryrefslogtreecommitdiff
path: root/protocols/Icq10/src/http.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Icq10/src/http.cpp')
-rw-r--r--protocols/Icq10/src/http.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/protocols/Icq10/src/http.cpp b/protocols/Icq10/src/http.cpp
index 294fbda1e9..e538450ee5 100644
--- a/protocols/Icq10/src/http.cpp
+++ b/protocols/Icq10/src/http.cpp
@@ -34,21 +34,7 @@ void __cdecl CIcqProto::ServerThread(void*)
}
debugLogA("CIcqProto::WorkerThread: %s", "entering");
- {
- char mirVer[100];
- Miranda_GetVersionText(mirVer, _countof(mirVer));
-
- m_szAToken = getMStringA("AToken");
- m_szSessionKey = getMStringA("SessionKey");
- if (m_szAToken.IsEmpty() || m_szSessionKey.IsEmpty()) {
- 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") << INT_PARAM("s", m_dwUin) << WCHAR_PARAM("pwd", m_szPassword);
- pReq->flags |= NLHRF_NODUMPSEND;
- Push(pReq);
- }
- else StartSession();
- }
+ CheckPassword();
while (true) {
WaitForSingleObject(m_evRequestsQueue, 1000);
@@ -193,6 +179,7 @@ JsonReply::JsonReply(NETLIBHTTPREQUEST *pReply)
JSONNode &response = (*m_root)["response"];
m_errorCode = response["statusCode"].as_int();
+ m_detailCode = response["statusDetailCode"].as_int();
m_data = &response["data"];
}