diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-24 09:19:27 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-24 09:19:27 +0000 |
commit | a2ae51e943d855748962f4738dd9f87b96ad00b0 (patch) | |
tree | c847b6c22b05105f65f3a981e1e90302d9b95957 /protocols/Steam/src/steam_request.cpp | |
parent | 799f5807fe6c3797787768b385e7e7c22a26a6c2 (diff) |
Steam: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@14358 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_request.cpp')
-rw-r--r-- | protocols/Steam/src/steam_request.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/protocols/Steam/src/steam_request.cpp b/protocols/Steam/src/steam_request.cpp index 05a7b235b1..c480628151 100644 --- a/protocols/Steam/src/steam_request.cpp +++ b/protocols/Steam/src/steam_request.cpp @@ -35,6 +35,11 @@ static void SteamHttpResponse(const NETLIBHTTPREQUEST *response, void *arg) {
SteamResponseDelegate *delegate = (SteamResponseDelegate*)arg;
delegate->Invoke(response);
+}
+
+void SteamResponseDelegateFree(void *arg)
+{
+ SteamResponseDelegate *delegate = (SteamResponseDelegate*)arg;
delete delegate;
}
@@ -46,28 +51,28 @@ void CSteamProto::PushRequest(HttpRequest *request) void CSteamProto::PushRequest(HttpRequest *request, SteamResponseCallback response)
{
SteamResponseDelegate *delegate = new SteamResponseDelegate(this, response);
- requestQueue->Push(request, SteamHttpResponse, delegate);
+ requestQueue->Push(request, SteamHttpResponse, delegate, SteamResponseDelegateFree);
}
void CSteamProto::PushRequest(HttpRequest *request, SteamResponseWithArgCallback response, void *arg, HttpFinallyCallback last)
{
SteamResponseDelegate *delegate = new SteamResponseDelegate(this, response, arg, last);
- requestQueue->Push(request, SteamHttpResponse, delegate);
+ requestQueue->Push(request, SteamHttpResponse, delegate, SteamResponseDelegateFree);
}
void CSteamProto::SendRequest(HttpRequest *request)
{
- requestQueue->Send(request, NULL, NULL);
+ requestQueue->Send(request);
}
void CSteamProto::SendRequest(HttpRequest *request, SteamResponseCallback response)
{
SteamResponseDelegate *delegate = new SteamResponseDelegate(this, response);
- requestQueue->Send(request, SteamHttpResponse, delegate);
+ requestQueue->Send(request, SteamHttpResponse, delegate, SteamResponseDelegateFree);
}
void CSteamProto::SendRequest(HttpRequest *request, SteamResponseWithArgCallback response, void *arg, HttpFinallyCallback last)
{
SteamResponseDelegate *delegate = new SteamResponseDelegate(this, response, arg, last);
- requestQueue->Send(request, SteamHttpResponse, delegate);
+ requestQueue->Send(request, SteamHttpResponse, delegate, SteamResponseDelegateFree);
}
|