[PATCH v2 1/5] mdns: Set error when failing due to missing avahi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/rpc/virnetservermdns.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/rpc/virnetservermdns.c b/src/rpc/virnetservermdns.c
index 131968061c5f..7f12a2947363 100644
--- a/src/rpc/virnetservermdns.c
+++ b/src/rpc/virnetservermdns.c
@@ -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;
 }

-- 
2.4.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]