summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_profile.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-01-29 19:14:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-01-29 19:14:39 +0300
commit8d60f01ae16e88730284757f0a062300b63b2b2d (patch)
tree16b490084d48c8d7a889d2b503ab0421f1c2c825 /protocols/SkypeWeb/src/skype_profile.cpp
parent1a1474ff783f5e6a3759110bf63ace1d0d53bd83 (diff)
fixes #2149 (SkypeWeb doesn't parse error codes)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_profile.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_profile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp
index 24b6aa375a..5d9c1cf8da 100644
--- a/protocols/SkypeWeb/src/skype_profile.cpp
+++ b/protocols/SkypeWeb/src/skype_profile.cpp
@@ -406,12 +406,13 @@ void CSkypeProto::LoadProfile(const NETLIBHTTPREQUEST *response, void *arg)
return;
}
- JSONNode root = JSONNode::parse(response->pData);
- if (!root) {
+ JsonReply reply(response);
+ if (reply.error()) {
ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, 0);
return;
}
+ auto &root = reply.data();
std::string username = root["username"].as_string();
if (username.empty()) {
ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, 0);