summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_files.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-05 15:54:03 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-05 15:54:03 +0300
commit14c4e44a0a91e1ad701d4ae3c58185d25118e64e (patch)
tree50f36035466f355c74373e757bc00b6610ce6267 /protocols/SkypeWeb/src/skype_files.cpp
parent94667140aeb3886d22e4c1301423fe99aaf3fba4 (diff)
Netlib:
- NETLIBHTTPHEADER & NETLIBHTTPREQUEST obsoleted; - NETLIBHTTPREQUEST divided into MHttpRequest & MHttpResponse; - MHttpHeaders now manager headers both for MHttpRequest & MHttpResponse;
Diffstat (limited to 'protocols/SkypeWeb/src/skype_files.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_files.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp
index 358a337e90..9eaef8b665 100644
--- a/protocols/SkypeWeb/src/skype_files.cpp
+++ b/protocols/SkypeWeb/src/skype_files.cpp
@@ -28,10 +28,10 @@ void CSkypeProto::SendFileThread(void *p)
PushRequest(new ASMObjectCreateRequest(this, fup));
}
-void CSkypeProto::OnASMObjectCreated(NETLIBHTTPREQUEST *response, AsyncHttpRequest *pRequest)
+void CSkypeProto::OnASMObjectCreated(MHttpResponse *response, AsyncHttpRequest *pRequest)
{
auto *fup = (CFileUploadParam*)pRequest->pUserInfo;
- if (response == nullptr || response->pData == nullptr) {
+ if (response == nullptr || response->body.IsEmpty()) {
LBL_Error:
FILETRANSFER_FAILED(fup);
return;
@@ -42,7 +42,7 @@ LBL_Error:
goto LBL_Error;
}
- JSONNode node = JSONNode::parse((char*)response->pData);
+ JSONNode node = JSONNode::parse(response->body);
std::string strObjectId = node["id"].as_string();
if (strObjectId.empty()) {
debugLogA("Invalid server response (empty object id)");
@@ -74,7 +74,7 @@ LBL_Error:
fclose(pFile);
}
-void CSkypeProto::OnASMObjectUploaded(NETLIBHTTPREQUEST *response, AsyncHttpRequest *pRequest)
+void CSkypeProto::OnASMObjectUploaded(MHttpResponse *response, AsyncHttpRequest *pRequest)
{
auto *fup = (CFileUploadParam*)pRequest->pUserInfo;
if (response == nullptr) {