[PATCH 06/21] daemon: Set error for unknown server name

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

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/rpc/virnetdaemon.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c
index 3dc47792a8ba..8ddcd9baddc9 100644
--- a/src/rpc/virnetdaemon.c
+++ b/src/rpc/virnetdaemon.c
@@ -187,6 +187,11 @@ virNetDaemonGetServer(virNetDaemonPtr dmn,
     srv = virObjectRef(virHashLookup(dmn->servers, serverName));
     virObjectUnlock(dmn);

+    if (!srv) {
+        virReportError(VIR_ERR_NO_SERVER,
+                       _("No server named '%s'"), serverName);
+    }
+
     return srv;
 }

-- 
2.7.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]