diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_trouter.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index b3452e8ce8..cfc41f7b8c 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -19,16 +19,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void CSkypeProto::OnCreateTrouter(const NETLIBHTTPREQUEST *response)
{
- if (response == nullptr || response->pData == nullptr) {
+ JsonReply reply(response);
+ if (reply.error()) {
LBL_Error:
debugLogA("Failed to establish a TRouter connection.");
return;
}
- JsonReply reply(response);
- if (reply.error())
- goto LBL_Error;
-
auto &root = reply.data();
const JSONNode &ccid = root["ccid"];
const JSONNode &connId = root["connId"];
@@ -50,16 +47,13 @@ LBL_Error: void CSkypeProto::OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response)
{
- if (response == nullptr || response->pData == nullptr) {
+ JsonReply reply(response);
+ if (reply.error()) {
LBL_Error:
debugLogA("Failed to establish a TRouter connection.");
return;
}
- JsonReply reply(response);
- if (reply.error())
- goto LBL_Error;
-
auto &root = reply.data();
const JSONNode &st = root["st"];
const JSONNode &se = root["se"];
|