From 2e6e01bc25249ff2ac70bf99bbe384f86141dc91 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 8 Apr 2015 21:24:58 +0000 Subject: kypeWeb: fixed statuses git-svn-id: http://svn.miranda-ng.org/main/trunk@12686 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_login.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index 913d23f46a..ed0ac93cf4 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -186,14 +186,23 @@ void CSkypeProto::OnStatusChanged(const NETLIBHTTPREQUEST *response) { m_iStatus++; - if (response == NULL || response->pData) + if (response == NULL) { debugLogA(__FUNCTION__ ": failed to change status"); ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGIN_ERROR_UNKNOWN); SetStatus(ID_STATUS_OFFLINE); + return; } JSONROOT json(response->pData); + if (json == NULL) + { + debugLogA(__FUNCTION__ ": failed to change status"); + ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGIN_ERROR_UNKNOWN); + SetStatus(ID_STATUS_OFFLINE); + return; + } + ptrT status(json_as_string(json_get(json, "status"))); int iNewStatus = SkypeToMirandaStatus(_T2A(status)); if (iNewStatus == ID_STATUS_OFFLINE) -- cgit v1.2.3