]> xenbits.xensource.com Git - libvirt.git/commitdiff
nwfilter: Don't try to acquire DBus context when DBus is disabled
authorPeter Krempa <pkrempa@redhat.com>
Tue, 28 Aug 2012 13:19:31 +0000 (15:19 +0200)
committerDaniel Veillard <veillard@redhat.com>
Wed, 29 Aug 2012 04:00:23 +0000 (12:00 +0800)
To silence error if DBus support is not compiled in.

src/nwfilter/nwfilter_driver.c

index ae099606f2f0a90702ae3bbb56d6d8eed112e16d..a30026ee7ca41a0d5675df48e985e74ec32da494 100644 (file)
@@ -168,7 +168,11 @@ static int
 nwfilterDriverStartup(int privileged)
 {
     char *base = NULL;
-    DBusConnection *sysbus = virDBusGetSystemBus();
+    DBusConnection *sysbus = NULL;
+
+#if HAVE_DBUS
+    sysbus = virDBusGetSystemBus();
+#endif /* HAVE_DBUS */
 
     if (VIR_ALLOC(driverState) < 0)
         goto alloc_err_exit;