summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_bootstrap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_bootstrap.cpp')
-rw-r--r--protocols/Tox/src/tox_bootstrap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_bootstrap.cpp b/protocols/Tox/src/tox_bootstrap.cpp
index 663e46a8ab..6e8a5d774e 100644
--- a/protocols/Tox/src/tox_bootstrap.cpp
+++ b/protocols/Tox/src/tox_bootstrap.cpp
@@ -121,12 +121,12 @@ void CToxProto::UpdateNodes()
debugLogA(__FUNCTION__": updating nodes");
HttpRequest request(REQUEST_GET, "https://nodes.tox.chat/json");
NLHR_PTR response(request.Send(m_hNetlibUser));
- if (!response || response->resultCode != HTTP_CODE_OK || !response->pData) {
+ if (!response || response->resultCode != HTTP_CODE_OK || response->body.IsEmpty()) {
debugLogA(__FUNCTION__": failed to dowload tox.json");
return;
}
- JSONNode root = JSONNode::parse(response->pData);
+ JSONNode root = JSONNode::parse(response->body);
if (root.empty()) {
debugLogA(__FUNCTION__": failed to dowload tox.json");
return;
@@ -142,7 +142,7 @@ void CToxProto::UpdateNodes()
return;
}
- if (fwrite(response->pData, sizeof(char), response->dataLength, hFile) != (size_t)response->dataLength)
+ if (fwrite(response->body, sizeof(char), response->body.GetLength(), hFile) != (size_t)response->body.GetLength())
debugLogA(__FUNCTION__": failed to write tox.json");
fclose(hFile);