Blame SOURCES/libvirt-network-fix-call-virNetworkEventLifecycleNew-when-networkStartNetwork-fail.patch

9119d9
From 08d3c335c6fd055aab8536a8bf4dbc1d69975007 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <08d3c335c6fd055aab8536a8bf4dbc1d69975007@dist-git>
9119d9
From: Luyao Huang <lhuang@redhat.com>
9119d9
Date: Wed, 12 Nov 2014 09:05:32 +0100
9119d9
Subject: [PATCH] network: fix call virNetworkEventLifecycleNew when
9119d9
 networkStartNetwork fail
9119d9
MIME-Version: 1.0
9119d9
Content-Type: text/plain; charset=UTF-8
9119d9
Content-Transfer-Encoding: 8bit
9119d9
9119d9
When start a network fail, libvirt still call virNetworkEventLifecycleNew
9119d9
to send a event.
9119d9
9119d9
Signed-off-by: Luyao Huang <lhuang@redhat.com>
9119d9
(cherry picked from commit 45d9ea5cddad5ed151db15362a881b730b8c88f1)
9119d9
Signed-off-by: Ján Tomko <jtomko@redhat.com>
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1162915
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/network/bridge_driver.c | 3 ++-
9119d9
 1 file changed, 2 insertions(+), 1 deletion(-)
9119d9
9119d9
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
9119d9
index d33de2f..9746099 100644
9119d9
--- a/src/network/bridge_driver.c
9119d9
+++ b/src/network/bridge_driver.c
9119d9
@@ -3253,7 +3253,8 @@ static int networkCreate(virNetworkPtr net)
9119d9
     if (virNetworkCreateEnsureACL(net->conn, network->def) < 0)
9119d9
         goto cleanup;
9119d9
 
9119d9
-    ret = networkStartNetwork(driver, network);
9119d9
+    if ((ret = networkStartNetwork(driver, network)) < 0)
9119d9
+        goto cleanup;
9119d9
 
9119d9
     event = virNetworkEventLifecycleNew(network->def->name,
9119d9
                                         network->def->uuid,
9119d9
-- 
9119d9
2.1.3
9119d9