mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
daemon: Set error for unknown server name
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
62be54861b
commit
cd0a980ee1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user