output/httpd: import GetEventLoop()

This commit is contained in:
Max Kellermann 2014-01-05 02:13:21 +01:00
parent 4c705334fa
commit dcbc05a9cd
2 changed files with 5 additions and 3 deletions

View File

@ -164,6 +164,8 @@ public:
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
using DeferredMonitor::GetEventLoop;
bool Init(const config_param &param, Error &error); bool Init(const config_param &param, Error &error);
void Finish() { void Finish() {

View File

@ -72,7 +72,7 @@ HttpdOutput::Bind(Error &error)
open = false; open = false;
bool result = false; bool result = false;
BlockingCall(DeferredMonitor::GetEventLoop(), [this, &error, &result](){ BlockingCall(GetEventLoop(), [this, &error, &result](){
result = ServerSocket::Open(error); result = ServerSocket::Open(error);
}); });
return result; return result;
@ -83,7 +83,7 @@ HttpdOutput::Unbind()
{ {
assert(!open); assert(!open);
BlockingCall(DeferredMonitor::GetEventLoop(), [this](){ BlockingCall(GetEventLoop(), [this](){
ServerSocket::Close(); ServerSocket::Close();
}); });
} }
@ -167,7 +167,7 @@ httpd_output_finish(struct audio_output *ao)
inline void inline void
HttpdOutput::AddClient(int fd) HttpdOutput::AddClient(int fd)
{ {
clients.emplace_front(*this, fd, ServerSocket::GetEventLoop(), clients.emplace_front(*this, fd, GetEventLoop(),
encoder->plugin.tag == nullptr); encoder->plugin.tag == nullptr);
++clients_cnt; ++clients_cnt;