[libvirt] [PATCH] nwfilter: Don't try to acquire DBus context when DBus is disabled

To silence error if DBus support is not compiled in. --- src/nwfilter/nwfilter_driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index ae09960..a30026e 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -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; -- 1.7.12

On Tue, Aug 28, 2012 at 03:19:31PM +0200, Peter Krempa wrote:
To silence error if DBus support is not compiled in. --- src/nwfilter/nwfilter_driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index ae09960..a30026e 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -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;
ACK, pushing, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
Peter Krempa