From a313a57561b0a4ab336f031f4ccd433d659bb7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 19 Dec 2015 20:41:58 +0000 Subject: Steam: Remove unused 'isTerminated' property of CSteamProto This also fixes incorrect quit from PollingThread, because it was previously checking this isTerminated property, which was always false. There is also other isTerminated property - but of RequestQueue - so maybe that's why was there this confusion. git-svn-id: http://svn.miranda-ng.org/main/trunk@15902 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_polling.cpp | 4 ++-- protocols/Steam/src/steam_proto.cpp | 1 - protocols/Steam/src/steam_proto.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp index 17a1aca1e2..43ceece247 100644 --- a/protocols/Steam/src/steam_polling.cpp +++ b/protocols/Steam/src/steam_polling.cpp @@ -173,7 +173,7 @@ void CSteamProto::PollingThread(void*) int errors = 0; int errorsLimit = getByte("PollingErrorsLimit", POLLING_ERRORS_LIMIT); - while (!isTerminated && errors < errorsLimit) + while (IsOnline() && errors < errorsLimit) { PollRequest *request = new PollRequest(token, umqId, messageId, IdleSeconds()); // request->nlc = m_pollingConnection; @@ -270,7 +270,7 @@ void CSteamProto::PollingThread(void*) m_hPollingThread = NULL; debugLog(_T("CSteamProto::PollingThread: leaving")); - if (!isTerminated) + if (IsOnline()) { debugLog(_T("CSteamProto::PollingThread: unexpected termination; switching protocol to offline")); SetStatus(ID_STATUS_OFFLINE); diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 2656442ad8..c8cdb86ed3 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -7,7 +7,6 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) CreateProtoService(PS_CREATEACCMGRUI, &CSteamProto::OnAccountManagerInit); m_idleTS = 0; - isTerminated = false; isLoginAgain = false; m_hQueueThread = NULL; m_pollingConnection = NULL; diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 34eafd3d7d..613a50c6b4 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -72,7 +72,6 @@ public: protected: TCHAR *password; - bool isTerminated; bool isLoginAgain; time_t m_idleTS; HANDLE m_evRequestsQueue, m_hQueueThread; -- cgit v1.2.3