[avahi] Identify failures when registering a service in Vala
Trent Lloyd
lathiat at bur.st
Sat May 20 05:34:04 UTC 2017
Visarion-Mingopol,
I admit I'm not really up to date on Vala, do you have an example of
your code I can look at?
Looking briefly here:
https://github.com/GNOME/vala/blob/master/vapi/avahi-gobject.vapi
https://github.com/GNOME/vala/blob/master/vapi/avahi-client.vapi
Assuming you are using the gobject API it does seem to have errors and
the avahi-gobject code itself converts these errnos into a GError with
all the various function calls - which is likely where you should access
it from.
My best guess, perhaps, is that you need to react to state_changed as
most errors you're likely to hit (i.e. conflict when publishing) won't
return immediately but instead later fire a state_changed event about
the collision. Is it in that handler that you can't access the error?
Regards,
Trent
On 17/01/17 01:22, Visarion-Mingopol Alexandru-Viorel wrote:
> Currently, in Vala we can notidentify which kind of failure happens
> while registering a service.
> In the official C example this is possible through
> fprintf(stderr, "Entry group failure: %s\n",
> avahi_strerror(avahi_client_errno(avahi_entry_group_get_client(g))));
> Unfortunately, in the Vala bindings, avahi_client_errno () is not
> included in the API.
> I would gladly try to include the avahi_client_errno () method in
> Vala, if this complies with your logical design/plans.
>
> --
> Visarion-Mingopol Alexandru-Viorel
> Telefon : 0729614060
> Best Bucuresti
>
>
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/avahi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/avahi/attachments/20170520/316087fb/attachment.html>
More information about the avahi
mailing list