networkStartDhcpDaemon: Check for dnsmasqCapsRefresh failure

Currently, we ignore whether dnsmasqCapsRefresh succeeds or fails. We
shouldn't do that as we may generate wrong dnsmasq command line (what
is done just a few lines below).

Signed-off-by: Hongwei Bi <hwbi2008@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Hongwei Bi 2013-10-22 21:38:01 +08:00 committed by Michal Privoznik
parent e24aec629d
commit 3a8cc9cf50

View File

@ -1107,7 +1107,8 @@ networkStartDhcpDaemon(virNetworkDriverStatePtr driver,
if (dctx == NULL)
goto cleanup;
dnsmasqCapsRefresh(&driver->dnsmasqCaps, false);
if (dnsmasqCapsRefresh(&driver->dnsmasqCaps, NULL) < 0)
goto cleanup;
ret = networkBuildDhcpDaemonCommandLine(network, &cmd, pidfile,
dctx, driver->dnsmasqCaps);