Re: [PATCH] network: fix call virNetworkEventLifecycleNew when networkStartNetwork fail

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

 



On Sat, Nov 01, 2014 at 06:03:23PM +0800, Luyao Huang wrote:
When start a network fail, libvirt still call virNetworkEventLifecycleNew
to send a event.

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
src/network/bridge_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 10ded33..11e86e0 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3253,7 +3253,8 @@ static int networkCreate(virNetworkPtr net)
    if (virNetworkCreateEnsureACL(net->conn, network->def) < 0)
        goto cleanup;

-    ret = networkStartNetwork(driver, network);
+    if ((ret = networkStartNetwork(driver, network)) < 0)
+        goto cleanup;

    event = virNetworkEventLifecycleNew(network->def->name,
                                        network->def->uuid,
--
1.8.3.1


ACK && will push in a while,

Martin

Attachment: signature.asc
Description: Digital signature

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