Bug 8367 - reference count for connections is too high
Summary: reference count for connections is too high
Status: RESOLVED DUPLICATE of bug 8376
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-20 08:53 UTC by Jos van den Oever
Modified: 2006-09-24 09:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.