summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-12 21:27:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-12 21:27:03 +0300
commit3cb3883908e3168e5f955be3143771721614307a (patch)
treee160797994b28577e5fa71a4c790e1670e6f4035 /plugins/PluginUpdater
parent6461f17159c83bfaeba1ecbd124ab53551f3e22d (diff)
Netlib_FreeHttpRequest() instead of MS_NETLIB_FREEHTTPREQUESTSTRUCT
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index 7e2555d86e..186cf9dc34 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -259,7 +259,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)
bool ret = false;
for (int i = 0; !ret && i < MAX_RETRIES; i++) {
Netlib_LogfW(hNetlibUser,L"Downloading file %s to %s (attempt %d)",pFileURL->tszDownloadURL,pFileURL->tszDiskPath, i+1);
- NETLIBHTTPREQUEST *pReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *pReply = Netlib_HttpTransaction(hNetlibUser, &nlhr);
if (pReply) {
nlc = pReply->nlc;
if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) {
@@ -270,7 +270,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)
if (crc != pFileURL->CRCsum) {
// crc check failed, try again
Netlib_LogfW(hNetlibUser,L"crc check failed for file %s",pFileURL->tszDiskPath);
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pReply);
+ Netlib_FreeHttpRequest(pReply);
continue;
}
}
@@ -296,9 +296,9 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)
}
ret = true;
}
- else
- Netlib_LogfW(hNetlibUser,L"Downloading file %s failed with error %d",pFileURL->tszDownloadURL,pReply->resultCode);
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pReply);
+ else Netlib_LogfW(hNetlibUser,L"Downloading file %s failed with error %d",pFileURL->tszDownloadURL,pReply->resultCode);
+
+ Netlib_FreeHttpRequest(pReply);
}
else {
Netlib_LogfW(hNetlibUser,L"Downloading file %s failed, host is propably temporary down.",pFileURL->tszDownloadURL);