From: John Ferlan Date: Mon, 6 Nov 2017 21:55:15 +0000 (-0500) Subject: libvirtd: Alter order of virNetDaemonNew X-Git-Tag: v3.10.0-rc1~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=723cadd9ff4a728985806c27776fadd6e3d25fef;p=thirdparty%2Flibvirt.git libvirtd: Alter order of virNetDaemonNew Let's be sure we can get a Daemon object before the server object. This is a more "orderly" way to do things since the svr object would be added to the dmn object afterwards. --- diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 4fc33ba0d4..73f24915df 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1297,6 +1297,11 @@ int main(int argc, char **argv) { goto cleanup; } + if (!(dmn = virNetDaemonNew())) { + ret = VIR_DAEMON_ERR_INIT; + goto cleanup; + } + if (!(srv = virNetServerNew("libvirtd", 1, config->min_workers, config->max_workers, @@ -1314,8 +1319,7 @@ int main(int argc, char **argv) { goto cleanup; } - if (!(dmn = virNetDaemonNew()) || - virNetDaemonAddServer(dmn, srv) < 0) { + if (virNetDaemonAddServer(dmn, srv) < 0) { ret = VIR_DAEMON_ERR_INIT; goto cleanup; }