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

@ -166,13 +166,13 @@ static const struct spa_dict_item module_props[] = {
struct impl {
struct pw_context *context;
struct pw_loop *loop;
struct pw_impl_module *module;
struct spa_hook module_listener;
struct pw_properties *properties;
bool discover_local;
struct pw_loop *loop;
AvahiPoll *avahi_poll;
AvahiClient *client;
@ -850,10 +850,8 @@ static int start_client(struct impl *impl)
static int start_avahi(struct impl *impl)
{
struct pw_loop *loop;
loop = pw_context_get_main_loop(impl->context);
impl->avahi_poll = pw_avahi_poll_new(loop);
impl->avahi_poll = pw_avahi_poll_new(impl->context);
return start_client(impl);
}