]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Remove use of virConnectPtr from all remaining nwfilter code
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 3 Oct 2013 11:51:48 +0000 (12:51 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 7 Oct 2013 13:19:10 +0000 (14:19 +0100)
commit999d72fbd59ea712128ae294b69b6a54039d757b
treefdeeb166fed7f9e23d7667bf319885cb123a4b7b
parentebca369e3fe5ac999c261c2d44e60a1bac3cfe65
Remove use of virConnectPtr from all remaining nwfilter code

The virConnectPtr is passed around loads of nwfilter code in
order to provide it as a parameter to the callback registered
by the virt drivers. None of the virt drivers use this param
though, so it serves no purpose.

Avoiding the need to pass a virConnectPtr means that the
nwfilterStateReload method no longer needs to open a bogus
QEMU driver connection. This addresses a race condition that
can lead to a crash on startup.

The nwfilter driver starts before the QEMU driver and registers
some callbacks with DBus to detect firewalld reload. If the
firewalld reload happens while the QEMU driver is still starting
up though, the nwfilterStateReload method will open a connection
to the partially initialized QEMU driver and cause a crash.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/conf/nwfilter_conf.c
src/conf/nwfilter_conf.h
src/lxc/lxc_driver.c
src/nwfilter/nwfilter_driver.c
src/qemu/qemu_driver.c
src/uml/uml_driver.c