diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-29 19:14:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-29 19:14:39 +0300 |
commit | 8d60f01ae16e88730284757f0a062300b63b2b2d (patch) | |
tree | 16b490084d48c8d7a889d2b503ab0421f1c2c825 /protocols/SkypeWeb/src/skype_search.cpp | |
parent | 1a1474ff783f5e6a3759110bf63ace1d0d53bd83 (diff) |
fixes #2149 (SkypeWeb doesn't parse error codes)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_search.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_search.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp index 56e29adb18..31b460aa62 100644 --- a/protocols/SkypeWeb/src/skype_search.cpp +++ b/protocols/SkypeWeb/src/skype_search.cpp @@ -44,12 +44,13 @@ void CSkypeProto::OnSearch(const NETLIBHTTPREQUEST *response) return;
}
- JSONNode root = JSONNode::parse(response->pData);
- if (!root) {
+ JsonReply reply(response);
+ if (reply.error()) {
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
return;
}
+ auto &root = reply.data();
const JSONNode &items = root["results"].as_array();
for (auto &it : items) {
const JSONNode &item = it["nodeProfileData"];
|