From 0f73f1572a03e5bae2664c1b2bb2cd18a1e33fca Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 31 Mar 2015 21:33:48 +0000 Subject: SkypeWeb: - refactored status setting - refactored HttpRequest 3 git-svn-id: http://svn.miranda-ng.org/main/trunk@12579 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_events.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_events.cpp') 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) -- cgit v1.2.3