summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_account.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-04-03 19:45:30 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-04-03 19:45:30 +0000
commit9149e4c655c6e810ed9cb7a85b8be0eedb201a66 (patch)
tree4bd6238c79eb60cf7502ac47a858c961b35cfc17 /protocols/Steam/src/steam_account.cpp
parentce6e09d0d0d42580b6d1ad6747ac54d82dc821da (diff)
Steam: first approach of server polling
git-svn-id: http://svn.miranda-ng.org/main/trunk@8843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_account.cpp')
-rw-r--r--protocols/Steam/src/steam_account.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/Steam/src/steam_account.cpp b/protocols/Steam/src/steam_account.cpp
index 632969ad67..8f9b932347 100644
--- a/protocols/Steam/src/steam_account.cpp
+++ b/protocols/Steam/src/steam_account.cpp
@@ -45,6 +45,7 @@ void CSteamProto::LogInThread(void* param)
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, ID_STATUS_OFFLINE);
return;
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
}
token = authResult.GetToken();
@@ -63,13 +64,16 @@ void CSteamProto::LogInThread(void* param)
}
setString("SessionID", login.GetSessionId());
- setString("MessageID", login.GetMessageId());
+ setDword("MessageID", login.GetMessageId());
m_iStatus = m_iDesiredStatus;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iDesiredStatus);
- if (m_hPollingThread == NULL)
+ if (m_hPollingThread == NULL && !m_bTerminated)
+ {
+ m_bTerminated = false;
m_hPollingThread = ForkThreadEx(&CSteamProto::PollingThread, NULL, NULL);
+ }
SteamWebApi::FriendListApi::FriendList friendList;
SteamWebApi::FriendListApi::Load(m_hNetlibUser, token, login.GetSteamId(), &friendList);