]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
mdns: Set error when failing due to missing avahi
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 4 Jun 2015 15:34:42 +0000 (17:34 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 5 Jun 2015 11:41:35 +0000 (13:41 +0200)
When building without avahi support, we used VIR_DEBUG() to note that to
the user.  However, functions that fail because of that (return NULL/-1)
did not set the error message.  This was the only file that forgot to do
such thing.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/rpc/virnetservermdns.c

index 131968061c5f6cf2132b9a52e24afc9d6205c9ae..7f12a294736314de94080c6e164be9f6a7b9890d 100644 (file)
@@ -617,14 +617,14 @@ static const char *unsupported = N_("avahi not available at build time");
 virNetServerMDNS *
 virNetServerMDNSNew(void)
 {
-    VIR_DEBUG("%s", _(unsupported));
+    virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
     return NULL;
 }
 
 int
 virNetServerMDNSStart(virNetServerMDNS *mdns ATTRIBUTE_UNUSED)
 {
-    VIR_DEBUG("%s", _(unsupported));
+    virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
     return -1;
 }
 
@@ -632,7 +632,7 @@ virNetServerMDNSGroupPtr
 virNetServerMDNSAddGroup(virNetServerMDNS *mdns ATTRIBUTE_UNUSED,
                          const char *name ATTRIBUTE_UNUSED)
 {
-    VIR_DEBUG("%s", _(unsupported));
+    virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
     return NULL;
 }
 
@@ -648,7 +648,7 @@ virNetServerMDNSAddEntry(virNetServerMDNSGroupPtr group ATTRIBUTE_UNUSED,
                          const char *type ATTRIBUTE_UNUSED,
                          int port ATTRIBUTE_UNUSED)
 {
-    VIR_DEBUG("%s", _(unsupported));
+    virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
     return NULL;
 }