diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-22 19:43:06 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-22 19:43:06 +0000 |
commit | 15dfb1f918233b5f083a02fc01c264889ee90351 (patch) | |
tree | 045e3326ca6c0e8a37e20173b07d4fac8614b44d | |
parent | 793ed2c300803e66baf0e39559cf6cc71e4766b2 (diff) |
SkypeWeb:reverted previous commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@15014 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/SkypeWeb/src/skype_login.cpp | 13 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 7 |
3 files changed, 5 insertions, 21 deletions
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index 3a9446553c..3db5b33aaf 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. UINT_PTR CSkypeProto::m_timer;
-void CSkypeProto::Login(void*)
+void CSkypeProto::Login()
{
// login
m_iStatus = ID_STATUS_CONNECTING;
@@ -34,11 +34,6 @@ void CSkypeProto::Login(void*) ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGIN_ERROR_UNKNOWN);
return;
}
-
- mir_cslock lck(m_LoginLock);
-
- if (m_iStatus > ID_STATUS_OFFLINE) return;
-
HistorySynced = isTerminated = false;
if ((tokenExpires - 1800) > time(NULL))
OnLoginSuccess();
@@ -49,10 +44,6 @@ void CSkypeProto::Login(void*) else
SendRequest(new LoginOAuthRequest(li.szSkypename, szPassword), &CSkypeProto::OnLoginOAuth);
}
-
- ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_CONNECTING);
-
- WaitForSingleObject(m_hLoginEvent, INFINITE);
}
void CSkypeProto::OnLoginOAuth(const NETLIBHTTPREQUEST *response)
@@ -266,8 +257,6 @@ void CSkypeProto::OnCapabilitiesSended(const NETLIBHTTPREQUEST *response) m_hPollingThread = ForkThreadEx(&CSkypeProto::PollingThread, 0, NULL);
- SetEvent(m_hLoginEvent);
-
SendRequest(new LoadChatsRequest(li), &CSkypeProto::OnLoadChats);
SendRequest(new CreateTrouterRequest(), &CSkypeProto::OnCreateTrouter);
PushRequest(new GetContactListRequest(li, NULL), &CSkypeProto::LoadContactList);
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index f4bdb7aac9..24b1cf110a 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -49,7 +49,6 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) : SkinAddNewSoundEx("skype_call_canceled", "SkypeWeb", LPGEN("Incoming call canceled sound"));
m_hTrouterEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- m_hLoginEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
SkypeSetTimer();
}
@@ -63,8 +62,7 @@ CSkypeProto::~CSkypeProto() UninitPopups();
CloseHandle(m_hTrouterEvent); m_hTrouterEvent = NULL;
- CloseHandle(m_hLoginEvent); m_hLoginEvent = NULL;
-
+
SkypeUnsetTimer();
}
@@ -237,7 +235,7 @@ int CSkypeProto::SetStatus(int iNewStatus) if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
{
- ForkThread(&CSkypeProto::Login, NULL);
+ Login();
}
else
{
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 1b9dc890e3..1b3a9d9d38 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -109,8 +109,6 @@ private: m_TrouterConnection,
m_hTrouterEvent;
- HANDLE m_hLoginEvent;
-
TRInfo TRouter;
LIST<void> m_PopupClasses;
@@ -124,9 +122,8 @@ private: mir_cs m_InviteDialogsLock;
mir_cs m_GCCreateDialogsLock;
mir_cs messageSyncLock;
- mir_cs m_LoginLock;
+ mir_cs m_StatusLock;
mir_cs m_AppendMessageLock;
-
static mir_cs accountsLock;
static mir_cs timerLock;
@@ -174,7 +171,7 @@ private: int __cdecl OnOptionsInit(WPARAM wParam, LPARAM lParam);
// login
- void __cdecl Login(void*);
+ void Login();
void OnMSLoginFirst(const NETLIBHTTPREQUEST *response);
void OnMSLoginSecond(const NETLIBHTTPREQUEST *response);
void OnMSLoginThird(const NETLIBHTTPREQUEST *response);
|