
On 10/11/2013 09:19 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
The dbus_bus_get() function returns a shared bus connection that all libraries in a process can use. You are forbidden from calling close on this connection though, since you can never know if any other code might be using it.
Doesn't that mean that multiple calls to dbus_bus_get() return the same shared bus when possible rather than creating a new one? Thus, how would you run out of resources if no new bus is created on the second call? Or is it a case of a new bus per set of different arguments, where we are consuming lots of shared buses by passing different arguments every time?
Add an option to use private dbus bus connections, if the app wants to be able to close the connection.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/libvirt_private.syms | 1 + src/util/virdbus.c | 16 +++++++++++++++- src/util/virdbus.h | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-)
At any rate, this patch makes sense. ACK. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org