modules: use timer-queue in avahi-poll

Pass the pw_context to get to the shared queue and loop.
Patch up the users of avahi-poll.

Fixes #4913
This commit is contained in:
Wim Taymans 2025-09-26 13:39:49 +02:00
parent 678e571d80
commit fdc74df383
7 changed files with 49 additions and 41 deletions

View file

@ -637,7 +637,6 @@ static const struct impl_events impl_events = {
static int module_zeroconf_publish_load(struct module *module)
{
struct module_zeroconf_publish_data *data = module->user_data;
struct pw_loop *loop;
int error;
data->core = pw_context_connect(module->impl->context, NULL, 0);
@ -650,8 +649,7 @@ static int module_zeroconf_publish_load(struct module *module)
&data->core_listener,
&core_events, data);
loop = pw_context_get_main_loop(module->impl->context);
data->avahi_poll = pw_avahi_poll_new(loop);
data->avahi_poll = pw_avahi_poll_new(module->impl->context);
data->client = avahi_client_new(data->avahi_poll, AVAHI_CLIENT_NO_FAIL,
client_callback, data, &error);