<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Visarion-Mingopol,<br>
</p>
<p>I admit I'm not really up to date on Vala, do you have an example
of your code I can look at?<br>
</p>
<p>Looking briefly here:<br>
<a class="moz-txt-link-freetext" href="https://github.com/GNOME/vala/blob/master/vapi/avahi-gobject.vapi">https://github.com/GNOME/vala/blob/master/vapi/avahi-gobject.vapi</a><br>
<a class="moz-txt-link-freetext" href="https://github.com/GNOME/vala/blob/master/vapi/avahi-client.vapi">https://github.com/GNOME/vala/blob/master/vapi/avahi-client.vapi</a></p>
<p>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.</p>
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?<br>
<br>
Regards,<br>
Trent<br>
<br>
<div class="moz-cite-prefix">On 17/01/17 01:22, Visarion-Mingopol
Alexandru-Viorel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPWVLRsGHVYdDF9qBshaXb7Y2o=5X-VxDoQavF5b6wCW=5PWaA@mail.gmail.com">
<div dir="ltr">
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif">Currently, in Vala we can not<span style="font-family:verdana,sans-serif"> identify which kind of failure happens while registering a service.</span></div>
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif">
</div>
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif">In the official C example this is possible through</div>
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif">fprintf(stderr, "Entry group failure: %s\n", avahi_strerror(avahi_client_errno(avahi_entry_group_get_client(g))));</div>
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif"> </div>
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif">Unfortunately, in the Vala bindings, avahi_client_errno () is not included in the API.</div>
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif">
</div>
<div class="gmail-pre-wrap" style="white-space:pre-wrap;word-wrap:break-word;color:rgb(0,0,0);font-family:verdana,sans-serif">I would gladly try to include the avahi_client_errno () method in Vala, if this complies with your logical design/plans. </div>
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Visarion-Mingopol Alexandru-Viorel
<div>
<div>Telefon : 0729614060</div>
</div>
<div>Best Bucuresti</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
avahi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:avahi@lists.freedesktop.org">avahi@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/avahi">https://lists.freedesktop.org/mailman/listinfo/avahi</a>
</pre>
</blockquote>
<br>
</body>
</html>