diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-14 12:12:02 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-14 12:12:02 +0000 |
commit | f68793bdec7018352995a4e15d7e64807362f6b6 (patch) | |
tree | 92f5a75bf0774cbef9737bdacca112ab95e9e104 /protocols/SkypeWeb/src/skype_search.cpp | |
parent | d6c3f8a49c8d4d679bc6dd55e9776bdd03c8c092 (diff) |
SkypeWeb: small fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@14559 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_search.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_search.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp index d8f1d2a3a2..3343dd5f2d 100644 --- a/protocols/SkypeWeb/src/skype_search.cpp +++ b/protocols/SkypeWeb/src/skype_search.cpp @@ -56,17 +56,14 @@ void CSkypeProto::OnSearch(const NETLIBHTTPREQUEST *response) const JSONNode &items = root.as_array();
for (size_t i = 0; i < items.size(); i++)
{
- const JSONNode &item = items.at(i);
+ const JSONNode &item = items[i];
const JSONNode &ContactCards = item["ContactCards"];
const JSONNode &Skype = ContactCards["Skype"];
- CMStringA displayName(Skype["DisplayName"].as_string().c_str());
- CMStringA nick(Skype["SkypeName"].as_string().c_str());
-
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_UTF8;
- psr.id.a = nick.GetBuffer();
- psr.nick.a = displayName.GetBuffer();
+ psr.id.a = mir_strdup(Skype["SkypeName"].as_string().c_str());
+ psr.nick.a = mir_strdup(Skype["DisplayName"].as_string().c_str());
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr);
}
|