summaryrefslogtreecommitdiff
path: root/src/lib/curl/Request.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-09-21 22:44:44 +0200
committerMax Kellermann <max@musicpd.org>2017-09-21 22:53:17 +0200
commit431eb7bc8c75c4ae61093fe75f05dc0dec372fcf (patch)
tree594d185eb4ffdfc1bf1ef2cf1de4858c902764a0 /src/lib/curl/Request.cxx
parent9df4853e23987a5de9b7ce0c69cef4cbee7fbcbf (diff)
lib/curl/{Global,Request}: migrate from DeferredMonitor to DeferEvent
Diffstat (limited to 'src/lib/curl/Request.cxx')
-rw-r--r--src/lib/curl/Request.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx
index 19858ceec..02232a56a 100644
--- a/src/lib/curl/Request.cxx
+++ b/src/lib/curl/Request.cxx
@@ -46,8 +46,9 @@
CurlRequest::CurlRequest(CurlGlobal &_global, const char *url,
CurlResponseHandler &_handler)
- :DeferredMonitor(_global.GetEventLoop()),
- global(_global), handler(_handler)
+ :global(_global), handler(_handler),
+ postpone_error_event(global.GetEventLoop(),
+ BIND_THIS_METHOD(OnPostponeError))
{
error_buffer[0] = 0;
@@ -241,7 +242,7 @@ CurlRequest::DataReceived(const void *ptr, size_t received_size)
/* move the CurlResponseHandler::OnError() call into a
"safe" stack frame */
postponed_error = std::current_exception();
- DeferredMonitor::Schedule();
+ postpone_error_event.Schedule();
return CURL_WRITEFUNC_PAUSE;
}
@@ -260,7 +261,7 @@ CurlRequest::WriteFunction(void *ptr, size_t size, size_t nmemb, void *stream)
}
void
-CurlRequest::RunDeferred()
+CurlRequest::OnPostponeError()
{
assert(postponed_error);