]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Catch dnsmasq start failures
authorGuido Günther <agx@sigxcpu.org>
Sat, 23 Jul 2011 21:24:21 +0000 (23:24 +0200)
committerGuido Günther <agx@sigxcpu.org>
Mon, 25 Jul 2011 20:34:03 +0000 (22:34 +0200)
While we checked the return value we didn't maks sure ret != 0 which
resulted in dnsmasq errors being ignored.

src/network/bridge_driver.c

index f242db8c052542d09fd896f0bfff599236ee349a..a21b538a5d37e548c59e9dcd6e26629c1d8e5534 100644 (file)
@@ -745,8 +745,10 @@ networkStartDhcpDaemon(virNetworkObjPtr network)
     if (ret < 0)
         goto cleanup;
 
-    if (virCommandRun(cmd, NULL) < 0)
+    ret = virCommandRun(cmd, NULL);
+    if (ret < 0) {
         goto cleanup;
+    }
 
     /*
      * There really is no race here - when dnsmasq daemonizes, its