]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu-dbus: prevent double start of the bus daemon
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 8 Apr 2020 17:23:48 +0000 (19:23 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 22 Apr 2020 07:58:10 +0000 (09:58 +0200)
Allow calling qemuDBusStart() multiple times (as may be done by
qemu-slirp already).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_dbus.c

index f3e6f3ee3704f61f3ceecc1794ed9e6ec47eb03b..ae55bbb299339f95535d80c938523141d6bcf494 100644 (file)
@@ -177,6 +177,9 @@ qemuDBusStart(virQEMUDriverPtr driver,
     pid_t cpid = -1;
     int ret = -1;
 
+    if (priv->dbusDaemonRunning)
+        return 0;
+
     if (!virFileIsExecutable(cfg->dbusDaemonName)) {
         virReportSystemError(errno,
                              _("'%s' is not a suitable dbus-daemon"),