From 2cbe21c791aeb28c61a26a6ff447ba2089f58181 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 27 Jan 2013 22:53:21 +0100 Subject: ZeroconfAvahi: pass GMainContext to avahi_glib_poll_new() --- src/ZeroconfAvahi.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ZeroconfAvahi.cxx') diff --git a/src/ZeroconfAvahi.cxx b/src/ZeroconfAvahi.cxx index 8fa745a6..4764ad75 100644 --- a/src/ZeroconfAvahi.cxx +++ b/src/ZeroconfAvahi.cxx @@ -21,6 +21,7 @@ #include "ZeroconfAvahi.hxx" #include "ZeroconfInternal.hxx" #include "Listen.hxx" +#include "event/Loop.hxx" #include "mpd_error.h" #include @@ -216,7 +217,7 @@ static void avahiClientCallback(AvahiClient * c, AvahiClientState state, } void -AvahiInit(const char *serviceName) +AvahiInit(EventLoop &loop, const char *serviceName) { int error; g_debug("Initializing interface"); @@ -228,7 +229,8 @@ AvahiInit(const char *serviceName) avahiRunning = 1; - avahi_glib_poll = avahi_glib_poll_new(NULL, G_PRIORITY_DEFAULT); + avahi_glib_poll = avahi_glib_poll_new(loop.GetContext(), + G_PRIORITY_DEFAULT); avahi_poll = avahi_glib_poll_get(avahi_glib_poll); avahiClient = avahi_client_new(avahi_poll, AVAHI_CLIENT_NO_FAIL, -- cgit v1.2.3