From b03e0c7a4c064ef4a6a4a8c416980216083e605b Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 30 May 2015 11:42:38 +0000 Subject: SkypeWeb: Small fixes. git-svn-id: http://svn.miranda-ng.org/main/trunk@13908 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_history_sync.cpp | 3 +-- protocols/SkypeWeb/src/skype_login.cpp | 2 +- protocols/SkypeWeb/src/skype_messages.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index e60131b490..3af754abab 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -86,9 +86,8 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) db_event_get(dbevent, &dbei); time_t dbEventTimestamp = dbei.timestamp; - ptrA dbMsgText((char *)mir_alloc(dbei.cbBlob)); - mir_strcpy(dbMsgText, (char*)dbei.pBlob); + ptrA dbMsgText(NEWSTR_ALLOCA((char *)dbei.pBlob)); TCHAR time[64]; _locale_t locale = _create_locale(LC_ALL, ""); diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index 2f7738ae7c..54abba1078 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -226,7 +226,7 @@ void CSkypeProto::OnCapabilitiesSended(const NETLIBHTTPREQUEST *response) JSONNode root = JSONNode::parse(response->pData); if (root) - setString("SelfEndpointName", root["selfLink"].as_string().c_str()); + setString("SelfEndpointName", ptrA(SelfUrlToName(root["selfLink"].as_string().c_str()))); } void CSkypeProto::OnStatusChanged(const NETLIBHTTPREQUEST *response) diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 674033175b..309c4ea5a1 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -178,8 +178,8 @@ void CSkypeProto::OnPrivateMessageEvent(const JSONNode &node) db_event_get(dbevent, &dbei); time_t dbEventTimestamp = dbei.timestamp; - ptrA dbMsgText((char *)mir_alloc(dbei.cbBlob)); - mir_strcpy(dbMsgText, (char*)dbei.pBlob); + + ptrA dbMsgText(NEWSTR_ALLOCA((char *)dbei.pBlob)); TCHAR time[64]; _locale_t locale = _create_locale(LC_ALL, ""); -- cgit v1.2.3