groupCallback is called with AVAHI_ENTRY_GROUP_UNCOMMITED during the groups creation by avahi_entry_group_new.
Unfortunately, inside is no way to signal back to avahi-client that there has been a problem and that the group has been be destroyed. So after we set ref->group = NULL, it will still be assigned later after avahi_entry_group_new returns, leading to crashes.
The documentation even mentions this trap: (though the example is the other way around) https://www.avahi.org/doxygen/html/publish_8h.html#abb17598f2b6ec3c3f69defdd488d568c
Maybe AVAHI_ENTRY_GROUP_UNCOMMITED shouldn't really be used for anything...
I'm glad i figured this out now after way too many hours of debugging ;)
It's unknown to me why avahi_entry_group_add_service_strlst failed in the first place, will investigate that next.
groupCallback
is called with AVAHI_ENTRY_GROUP_UNCOMMITED during the groups creation byavahi_entry_group_new
. Unfortunately, inside is no way to signal back to avahi-client that there has been a problem and that the group has been be destroyed. So after we setref->group = NULL
, it will still be assigned later afteravahi_entry_group_new
returns, leading to crashes. The documentation even mentions this trap: (though the example is the other way around) https://www.avahi.org/doxygen/html/publish_8h.html#abb17598f2b6ec3c3f69defdd488d568c Maybe AVAHI_ENTRY_GROUP_UNCOMMITED shouldn't really be used for anything...I'm glad i figured this out now after way too many hours of debugging ;) It's unknown to me why
avahi_entry_group_add_service_strlst
failed in the first place, will investigate that next.