
On Fri, Nov 14, 2008 at 01:05:18PM +0100, Daniel Veillard wrote:
On Thu, Nov 13, 2008 at 05:29:15PM +0000, Daniel P. Berrange wrote:
This patch is a small incremental change to optionally allow us to build every driver as a dlopen()able module. This is disabled by default for now. I'm not sure whether this is hugely usefl or not, but it was easy enough to do, so here's the patch.
Good, I note there is also some renaming of entry points...
I'm just a bit surprized it affects tests too ...
+++ b/tests/xmconfigtest.c Thu Nov 13 17:13:02 2008 +0000 [...] virDomainDefFree(def); - if (conn) { - conn->privateData = old_priv; - virConnectClose(conn); - } + VIR_FREE(conn); [...] - if (conn) { - conn->privateData = old_priv; - virConnectClose(conn); - } + VIR_FREE(conn);
hum, that's a bit surprizing, we are not closing the connection to free the data structure anymore ... I assume there is a good reason but that's obscure.
Previously we were seriously abusing the virConnectPtr struct by getting an instance with test:///default URI, and then munging the private Data to point to XM's struct. I stopped opening a connection, and just have a struct directly initialized with the test data, so there's no need to explicitly close it - its a little clearer if you look further up the test case, rather than just this bit of diff context. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|