networkDestroy: Report error if network is inactive

This follows the same convention as domain drivers.
This commit is contained in:
Cole Robinson committed 2009-05-29 14:14:32 +00:00
1 parent 34497fdb37
commit 545c815c4c
2 files changed
+11

No files matched your search

+5
View File
@@ -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>
* src/qemu_driver.c: qemu_driver: Fix another domain startup error
+6
View File
@@ -1238,6 +1238,12 @@ static int networkDestroy(virNetworkPtr net) {
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);
if (!network->persistent) {
virNetworkRemoveInactive(&driver->networks,