mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
networkDestroy: Report error if network is inactive
This follows the same convention as domain drivers.
This commit is contained in:
parent
34497fdb37
commit
545c815c4c
@ -1,3 +1,8 @@
|
|||||||
|
Fri May 29 10:13:55 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||||
|
|
||||||
|
* src/network_driver.c: networkDestroy: Report error if network
|
||||||
|
is inactive
|
||||||
|
|
||||||
Fri May 29 10:10:00 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
Fri May 29 10:10:00 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||||
|
|
||||||
* src/qemu_driver.c: qemu_driver: Fix another domain startup error
|
* src/qemu_driver.c: qemu_driver: Fix another domain startup error
|
||||||
|
@ -1238,6 +1238,12 @@ static int networkDestroy(virNetworkPtr net) {
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!virNetworkIsActive(network)) {
|
||||||
|
networkReportError(net->conn, NULL, net, VIR_ERR_INTERNAL_ERROR,
|
||||||
|
"%s", _("network is not active"));
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
ret = networkShutdownNetworkDaemon(net->conn, driver, network);
|
ret = networkShutdownNetworkDaemon(net->conn, driver, network);
|
||||||
if (!network->persistent) {
|
if (!network->persistent) {
|
||||||
virNetworkRemoveInactive(&driver->networks,
|
virNetworkRemoveInactive(&driver->networks,
|
||||||
|
Loading…
Reference in New Issue
Block a user