[libvirt] [PATCH] virNetServer: Don't fail if we can't initialize avahi

Eric Blake eblake at redhat.com
Mon Jan 16 18:29:51 UTC 2012


On 01/14/2012 01:01 PM, Guido Günther wrote:
> since libvird won't start otherwise without avahi running.
> 
> Having avahi compiled in shouldn't force us to have avahi running.
> ---
>  src/rpc/virnetserver.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
> index f761e6b..ab6d112 100644
> --- a/src/rpc/virnetserver.c
> +++ b/src/rpc/virnetserver.c
> @@ -695,9 +695,8 @@ void virNetServerRun(virNetServerPtr srv)
>      virNetServerLock(srv);
>  
>  #if HAVE_AVAHI
> -    if (srv->mdns &&
> -        virNetServerMDNSStart(srv->mdns) < 0)
> -        goto cleanup;
> +    if (srv->mdns)
> +        virNetServerMDNSStart(srv->mdns);

virNetServerMDNSStart raises virNetError, but does not directly log
anything (so if the user clears out the last error, we may have lost the
information).  Should this patch also ensure that a log message is
emitted when avahi initialization is attempted but failed, now that we
are not treating it as a fatal error?

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120116/28739c20/attachment-0001.sig>


More information about the libvir-list mailing list