diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-12 21:27:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-12 21:27:03 +0300 |
commit | 3cb3883908e3168e5f955be3143771721614307a (patch) | |
tree | e160797994b28577e5fa71a4c790e1670e6f4035 /protocols/FacebookRM | |
parent | 6461f17159c83bfaeba1ecbd124ab53551f3e22d (diff) |
Netlib_FreeHttpRequest() instead of MS_NETLIB_FREEHTTPREQUESTSTRUCT
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/captcha.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 7 | ||||
-rw-r--r-- | protocols/FacebookRM/src/http_request.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/captcha.cpp b/protocols/FacebookRM/src/captcha.cpp index 5060d2c913..8e65cf6374 100644 --- a/protocols/FacebookRM/src/captcha.cpp +++ b/protocols/FacebookRM/src/captcha.cpp @@ -110,7 +110,7 @@ bool FacebookProto::RunCaptchaForm(std::string captchaUrl, std::string &result) req.szUrl = (char*)captchaUrl.c_str(); req.flags = NLHRF_NODUMPHEADERS; - NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)facy.handle_, (LPARAM)&req); + NETLIBHTTPREQUEST *reply = Netlib_HttpTransaction(facy.handle_, &req); if (reply == NULL) return false; diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 2e228719f3..c36c064994 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -108,7 +108,7 @@ http::response facebook_client::sendRequest(HttpRequest *request) resp.code = pnlhr->resultCode; resp.data = pnlhr->pData ? pnlhr->pData : ""; - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pnlhr); + Netlib_FreeHttpRequest(pnlhr); } else { parent->debugLogA("!!! No response from server (time-out)"); @@ -1192,8 +1192,7 @@ bool facebook_client::save_url(const std::string &url, const std::wstring &filen req.flags = NLHRF_HTTP11 | NLHRF_REDIRECT | NLHRF_PERSISTENT | NLHRF_NODUMP; req.nlc = nlc; - resp = reinterpret_cast<NETLIBHTTPREQUEST*>(CallService(MS_NETLIB_HTTPTRANSACTION, - reinterpret_cast<WPARAM>(handle_), reinterpret_cast<LPARAM>(&req))); + resp = Netlib_HttpTransaction(handle_, &req); bool ret = false; @@ -1215,7 +1214,7 @@ bool facebook_client::save_url(const std::string &url, const std::wstring &filen ret = _waccess(filename.c_str(), 0) == 0; } - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp); + Netlib_FreeHttpRequest(resp); } else { nlc = NULL; diff --git a/protocols/FacebookRM/src/http_request.h b/protocols/FacebookRM/src/http_request.h index 64750eef39..9e3a578f56 100644 --- a/protocols/FacebookRM/src/http_request.h +++ b/protocols/FacebookRM/src/http_request.h @@ -289,7 +289,7 @@ public: Netlib_Logf(nlu, "Send request to %s", szUrl); - return (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)nlu, (LPARAM)(NETLIBHTTPREQUEST*)this); + return Netlib_HttpTransaction(nlu, this); } }; |