Callum wilson
2018-07-09 15:08:52 UTC
Hi all,
I've been writing a small application which creates its own avahi stack.
I realise this isn't exactly standard, but I've been trying to dynamically add sub-types to a service depending on what other devices are looking for.
Currently, when I receive a request for a sub-type that I don't advertise, I reset the entry group, wait for the AVAHI_ENTRY_GROUP_UNCOMMITED event, re-add my main service and any existing and new subtypes, and then commit the group.
This works most ~75% of the time but eventually I get assert failures after successful registration of the group.
I've also tried deleting and recreating the entry group but I still get assert failures (although different asserts).
Am I missing some steps? I'm going through the daemon's code to see how this happens in there but I'm hoping someone will have the answer.
Thanks,
Callum
I've been writing a small application which creates its own avahi stack.
I realise this isn't exactly standard, but I've been trying to dynamically add sub-types to a service depending on what other devices are looking for.
Currently, when I receive a request for a sub-type that I don't advertise, I reset the entry group, wait for the AVAHI_ENTRY_GROUP_UNCOMMITED event, re-add my main service and any existing and new subtypes, and then commit the group.
This works most ~75% of the time but eventually I get assert failures after successful registration of the group.
I've also tried deleting and recreating the entry group but I still get assert failures (although different asserts).
Am I missing some steps? I'm going through the daemon's code to see how this happens in there but I'm hoping someone will have the answer.
Thanks,
Callum