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

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



Signed-off-by: Martin Kletzander <mkletzan redhat com>
---
 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


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