summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/Utils.cpp
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/NewsAggregator/Src/Utils.cpp
parent6461f17159c83bfaeba1ecbd124ab53551f3e22d (diff)
Netlib_FreeHttpRequest() instead of MS_NETLIB_FREEHTTPREQUESTSTRUCT
Diffstat (limited to 'plugins/NewsAggregator/Src/Utils.cpp')
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 0f16b5664e..d2d02635dc 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -81,7 +81,7 @@ void GetNewsData(wchar_t *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg
}
// download the page
- NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = Netlib_HttpTransaction(hNetlibUser, &nlhr);
if (nlhrReply) {
// if the recieved code is 200 OK
if (nlhrReply->resultCode == 200 && nlhrReply->dataLength > 0) {
@@ -101,7 +101,7 @@ void GetNewsData(wchar_t *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg
}
else Netlib_LogfW(hNetlibUser, L"Code %d: Failed getting feed data %s.", nlhrReply->resultCode, tszUrl);
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply);
+ Netlib_FreeHttpRequest(nlhrReply);
}
else Netlib_LogfW(hNetlibUser, L"Failed getting feed data %s, no response.", tszUrl);
@@ -305,7 +305,7 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
nlhr.headers[3].szValue = "no-cache";
bool ret = false;
- NETLIBHTTPREQUEST *pReply = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *pReply = Netlib_HttpTransaction(hNetlibUser, &nlhr);
if (pReply) {
if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) {
char *date = NULL, *size = NULL;
@@ -359,7 +359,7 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
CloseHandle(hFile);
}
}
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pReply);
+ Netlib_FreeHttpRequest(pReply);
}
mir_free(szUrl);