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/Tlen/src | |
parent | 6461f17159c83bfaeba1ecbd124ab53551f3e22d (diff) |
Netlib_FreeHttpRequest() instead of MS_NETLIB_FREEHTTPREQUESTSTRUCT
Diffstat (limited to 'protocols/Tlen/src')
-rw-r--r-- | protocols/Tlen/src/tlen.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_avatar.cpp | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index 1affd2da6e..34f6828abf 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -198,7 +198,7 @@ INT_PTR TlenProtocol::MenuHandleInbox(WPARAM, LPARAM) req.pData = form;
req.dataLength = (int)mir_strlen(form);
req.szUrl = "http://poczta.o2.pl/login.html";
- resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);
+ resp = Netlib_HttpTransaction(m_hNetlibUser, &req);
if (resp != NULL) {
if (resp->resultCode / 100 == 2 || resp->resultCode == 302) {
int i;
@@ -217,7 +217,7 @@ INT_PTR TlenProtocol::MenuHandleInbox(WPARAM, LPARAM) }
}
}
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp);
+ Netlib_FreeHttpRequest(resp);
}
}
mir_free(login);
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index f82d450634..bd9c031b3a 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -267,7 +267,7 @@ static void TlenGetAvatarThread(void *ptr) req.headers = NULL; req.dataLength = 0; req.szUrl = request; - NETLIBHTTPREQUEST *resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)data->proto->m_hNetlibUser, (LPARAM)&req); + NETLIBHTTPREQUEST *resp = Netlib_HttpTransaction(data->proto->m_hNetlibUser, &req); if (item != NULL) item->newAvatarDownloading = FALSE; @@ -297,7 +297,7 @@ static void TlenGetAvatarThread(void *ptr) } else RemoveAvatar(data->proto, hContact); } - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp); + Netlib_FreeHttpRequest(resp); } mir_free(request); mir_free(login); @@ -334,13 +334,13 @@ struct TLENREMOVEAVATARTHREADDATA static void TlenRemoveAvatarRequestThread(void *ptr) { TLENREMOVEAVATARTHREADDATA *data = (TLENREMOVEAVATARTHREADDATA*)ptr; NETLIBHTTPREQUEST *req = (NETLIBHTTPREQUEST *)data->req; - NETLIBHTTPREQUEST *resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)data->proto->m_hNetlibUser, (LPARAM)req); + NETLIBHTTPREQUEST *resp = Netlib_HttpTransaction(data->proto->m_hNetlibUser, req); mir_free(req->szUrl); mir_free(req->headers); mir_free(req->pData); mir_free(req); if (resp != NULL) { - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp); + Netlib_FreeHttpRequest(resp); RemoveAvatar(data->proto, NULL); } mir_free(data); @@ -379,9 +379,9 @@ static void TlenUploadAvatarRequestThread(void *ptr) { TLENUPLOADAVATARTHREADDATA *data = (TLENUPLOADAVATARTHREADDATA *) ptr; NETLIBHTTPREQUEST *req = data->req; - NETLIBHTTPREQUEST *resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)data->proto->m_hNetlibUser, (LPARAM)req); + NETLIBHTTPREQUEST *resp = Netlib_HttpTransaction(data->proto->m_hNetlibUser, req); if (checkUploadAvatarResponse(data->proto, resp)) { - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp); + Netlib_FreeHttpRequest(resp); SetAvatar(data->proto, NULL, NULL, data->data, data->length, PA_FORMAT_PNG); } mir_free(req->szUrl); |