diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-08 21:24:58 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-08 21:24:58 +0000 |
commit | 2e6e01bc25249ff2ac70bf99bbe384f86141dc91 (patch) | |
tree | 5f86c55d883f83bbb978a4835a943278284147a3 /protocols | |
parent | c6177d78b9b0f7ba8171293e316f2916f8e6a211 (diff) |
kypeWeb: fixed statuses
git-svn-id: http://svn.miranda-ng.org/main/trunk@12686 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/src/skype_login.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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)
|