summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_account.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-04-29 19:23:12 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-04-29 19:23:12 +0000
commit0b324ac64ba108f06bafb3a687a69ac148fdbbf6 (patch)
tree3ae699f9e8b5a92c016b2584998317583b023165 /protocols/Steam/src/steam_account.cpp
parentf27d98ff82bc2525ceaaaf51a0117fe360fbfeff (diff)
Steam: fixed contact management functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@9099 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_account.cpp')
-rw-r--r--protocols/Steam/src/steam_account.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/protocols/Steam/src/steam_account.cpp b/protocols/Steam/src/steam_account.cpp
index 90062d7375..0335d40b1d 100644
--- a/protocols/Steam/src/steam_account.cpp
+++ b/protocols/Steam/src/steam_account.cpp
@@ -146,8 +146,9 @@ void CSteamProto::LogInThread(void* param)
token = mir_strdup(authResult.GetToken());
setString("TokenSecret", token);
- //setString("Cookie", authResult.GetCookie());
+ setString("Cookie", authResult.GetCookie());
setString("SteamID", authResult.GetSteamid());
+ setString("SessionID", authResult.GetSessionId());
}
SteamWebApi::LoginApi::LoginResult loginResult;
@@ -179,6 +180,16 @@ void CSteamProto::LogInThread(void* param)
m_iStatus = m_iDesiredStatus;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus);
+ ptrA sessionId(getStringA("SessionID"));
+ if (!sessionId || lstrlenA(sessionId) == 0)
+ {
+ SteamWebApi::SessionApi::SessionId result;
+ debugLogA("CSteamProto::LogInThread: call SteamWebApi::SessionApi::GetSessionId");
+ SteamWebApi::SessionApi::GetSessionId(m_hNetlibUser, token, loginResult.GetSteamId(), &result);
+ if (result.IsSuccess())
+ setString("SessionID", result.GetSessionId());
+ }
+
// load contact list
LoadContactListThread(NULL);