diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-28 12:58:45 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-28 12:58:45 +0000 |
commit | 2de6603f69b343c3245043ab4c05292a617bd9ba (patch) | |
tree | a0930902daee55144d130a6bc77f8a22fedca4cc /protocols/Steam/src/steam_pooling.cpp | |
parent | 8817909629b3e0881672a7b7324fc7c583c331ad (diff) |
Use JSONROOT everywhere to simplify code and fix memleaks (in Dropbox and Steam)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11130 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_pooling.cpp')
-rw-r--r-- | protocols/Steam/src/steam_pooling.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Steam/src/steam_pooling.cpp b/protocols/Steam/src/steam_pooling.cpp index 2c07872fe3..78ac23e53c 100644 --- a/protocols/Steam/src/steam_pooling.cpp +++ b/protocols/Steam/src/steam_pooling.cpp @@ -188,8 +188,8 @@ void CSteamProto::PollingThread(void*) if (response == NULL || response->resultCode != HTTP_STATUS_OK)
return;
- JSONNODE *root = json_parse(response->pData), *node;
- node = json_get(root, "error");
+ JSONROOT root(response->pData);
+ JSONNODE *node = json_get(root, "error");
ptrW error(json_as_string(node));
if (!lstrcmpi(error, L"OK"))
@@ -207,7 +207,6 @@ void CSteamProto::PollingThread(void*) }
else if (!lstrcmpi(error, L"Timeout"))
{
- json_delete(root);
continue;
}
/*else if (!lstrcmpi(error, L"Not Logged On")) // 'else' below will handle this error, we don't need this particular check right now
@@ -234,7 +233,6 @@ void CSteamProto::PollingThread(void*) breaked = true;
}
- json_delete(root);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)response);
}
|