Bug 8367

Summary: reference count for connections is too high
Product: dbus Reporter: Jos van den Oever <jos>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED DUPLICATE QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Jos van den Oever 2006-09-20 08:53:04 UTC
The underlying code causes an invalid error message on DBus 0.92.
"dbus_shutdown() called but connections were still live!"

-------------------
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
#include <stdio.h>

int
main() {
    DBusConnection* conn;
    DBusError err;
    int ret;

    dbus_error_init(&err);
    conn = dbus_bus_get(DBUS_BUS_SESSION, &err);
    if (dbus_error_is_set(&err)) {
        fprintf(stderr, "Connection Error (%s)\n", err.message);
        dbus_error_free(&err);
        return 0;
    }
// uncomment the next line to avoid the shutdown error message
//    dbus_connection_unref(conn);
    dbus_connection_unref(conn);
    dbus_shutdown();

    return 0;
}
Comment 1 Havoc Pennington 2006-09-20 10:22:04 UTC
dbus_shutdown() will need to close() and drop all shared connections, I'm not 
sure it does that...
Comment 2 John (J5) Palmieri 2006-09-24 09:38:28 UTC

*** This bug has been marked as a duplicate of 8376 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.