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 /plugins/Dropbox/src/dropbox_transfers.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 'plugins/Dropbox/src/dropbox_transfers.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_transfers.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index e645f059fa..e1a538c664 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -40,7 +40,7 @@ int CDropbox::SendFileChunkedFirst(const char *data, int length, char *uploadId, if (response && response->resultCode == HTTP_STATUS_OK)
{
- JSONNODE *root = json_parse(response->pData);
+ JSONROOT root(response->pData);
if (root)
{
JSONNODE *node = json_get(root, "upload_id");
@@ -72,7 +72,7 @@ int CDropbox::SendFileChunkedNext(const char *data, int length, const char *uplo if (response && response->resultCode == HTTP_STATUS_OK)
{
- JSONNODE *root = json_parse(response->pData);
+ JSONROOT root(response->pData);
if (root)
{
JSONNODE *node = json_get(root, "offset");
@@ -154,8 +154,8 @@ int CDropbox::CreateDownloadUrl(const char *path, wchar_t *url) if (response && response->resultCode == HTTP_STATUS_OK)
{
- JSONNODE *root = json_parse(response->pData);
- if (root != NULL)
+ JSONROOT root(response->pData);
+ if (root)
{
JSONNODE *node = json_get(root, "url");
wcscpy(url, json_as_string(node));
|