windy1 / zeroconf-rs

zeroconf is a cross-platform library that wraps underlying ZeroConf/mDNS implementations such as Bonjour or Avahi, providing an easy and idiomatic way to both register and browse services.
MIT License
77 stars 25 forks source link

Improve AvahiEntryGroup error reporting #22

Closed MatteoJoliveau closed 1 year ago

MatteoJoliveau commented 2 years ago

This PR recovers the Avahi client error code and adds the corresponding message to the error String reported by ManagedAvahiEntryGroup::new. This helps debugging problems with Avahi.

In my particular case, for instance, the error message was could not initialize AvahiEntryGroup: not permitted because I didn't allow publishing user services. WIthout this addition it would have been very hard to find out what was wrong.

Signed-off-by: Matteo Joliveau matteojoliveau@gmail.com