summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_events.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-03-31 21:33:48 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-03-31 21:33:48 +0000
commit0f73f1572a03e5bae2664c1b2bb2cd18a1e33fca (patch)
treea5307998d7efd2cc464cc41dbf7ee3d0a6240ad3 /protocols/SkypeWeb/src/skype_events.cpp
parentff035d5933b88c564fdbf8ef5f899b6fa3ac63bb (diff)
SkypeWeb:
- refactored status setting - refactored HttpRequest 3 git-svn-id: http://svn.miranda-ng.org/main/trunk@12579 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_events.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_events.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp
index fdc0dd246c..35f3746713 100644
--- a/protocols/SkypeWeb/src/skype_events.cpp
+++ b/protocols/SkypeWeb/src/skype_events.cpp
@@ -92,8 +92,6 @@ void CSkypeProto::OnLoginSecond(const NETLIBHTTPREQUEST *response)
PushRequest(new GetRegInfoRequest(token.c_str()), &CSkypeProto::OnGetRegInfo);
PushRequest(new GetProfileRequest(token.c_str()), &CSkypeProto::LoadProfile);
PushRequest(new GetContactListRequest(token.c_str()), &CSkypeProto::LoadContactList);
-
- //ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus = m_iDesiredStatus);
}
void CSkypeProto::OnGetRegInfo(const NETLIBHTTPREQUEST *response)
@@ -123,12 +121,15 @@ void CSkypeProto::OnGetRegInfo(const NETLIBHTTPREQUEST *response)
}
PushRequest(new GetEndpointRequest(getStringA("registrationToken"), getStringA("endpointId")));
- SubscriptionsRequest *request = new SubscriptionsRequest(getStringA("registrationToken"));
- request->Send(m_hNetlibUser);
+ SubscriptionsRequest *request = new SubscriptionsRequest(getStringA("registrationToken"));
+ request->Send(m_hNetlibUser);
delete request;
m_hPollingThread = ForkThreadEx(&CSkypeProto::PollingThread, 0, NULL);
- PushRequest(new SetStatusRequest(getStringA("registrationToken"), ID_STATUS_ONLINE), &CSkypeProto::OnSetStatus);
+
+ m_iStatus = m_iDesiredStatus;
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus);
+ PushRequest(new SetStatusRequest(ptrA(getStringA("registrationToken")), MirandaToSkypeStatus(m_iStatus)), &CSkypeProto::OnSetStatus);
}
void CSkypeProto::OnSetStatus(const NETLIBHTTPREQUEST *response)