diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-06-06 19:01:08 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-06-06 19:01:08 +0000 |
commit | df5a99c47693ecca5337b1c0f1a65cdb6a4048a0 (patch) | |
tree | 49ff4b050ff24817b2e94375579f2463833d49db /protocols/SkypeWeb/src/skype_login.cpp | |
parent | ad1456fa6df7a681e91c75fb8912e507e9d0abc4 (diff) |
SkypeWeb: Fix status changing error 729.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14027 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_login.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_login.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index a6e26bc53c..b26516bc32 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
+UINT_PTR CSkypeProto::m_timer;
+
void CSkypeProto::OnLoginOAuth(const NETLIBHTTPREQUEST *response)
{
if (response == NULL || response->pData == NULL)
@@ -80,7 +82,6 @@ void CSkypeProto::OnLoginOAuth(const NETLIBHTTPREQUEST *response) OnLoginSuccess();
}
-
void CSkypeProto::OnLoginSuccess()
{
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_SUCCESS, NULL, 0);
@@ -172,21 +173,27 @@ void CSkypeProto::OnSubscriptionsCreated(const NETLIBHTTPREQUEST *response) SetStatus(ID_STATUS_OFFLINE);
return;
}
- char *cName;
+ SendPresence(true);
+}
+
+void CSkypeProto::SendPresence(bool isLogin)
+{
+ ptrA epname;
ptrT place(getTStringA("Place"));
- if (place && *place)
- cName = mir_utf8encodeT(place);
+ if (!getBool("UseHostName", false) && place && *place)
+ epname = mir_utf8encodeT(place);
else
{
- char compName[MAX_COMPUTERNAME_LENGTH + 1];
+ TCHAR compName[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = SIZEOF(compName);
- GetComputerNameA(compName, &size);
- cName = compName;
+ GetComputerName(compName, &size);
+ epname = mir_utf8encodeT(compName);
}
- PushRequest(new SendCapabilitiesRequest(RegToken, EndpointId, cName, Server), &CSkypeProto::OnCapabilitiesSended);
-
- mir_free(cName);
+ if (isLogin)
+ PushRequest(new SendCapabilitiesRequest(RegToken, EndpointId, epname, Server), &CSkypeProto::OnCapabilitiesSended);
+ else
+ PushRequest(new SendCapabilitiesRequest(RegToken, EndpointId, epname, Server));
}
void CSkypeProto::OnCapabilitiesSended(const NETLIBHTTPREQUEST *response)
|