From f1ca9b89e92de4d876dc5e7e85710c4d2dc87638 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 17 Oct 2006 20:52:13 +0000 Subject: 2006-10-17 Havoc Pennington * dbus/dbus-internals.c (_dbus_warn_check_failed): new function to be used for return_if_fail type warnings; prefixes the pid, and fatal by default. --- dbus/dbus-bus.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'dbus/dbus-bus.c') diff --git a/dbus/dbus-bus.c b/dbus/dbus-bus.c index 9eb2c526..1661f246 100644 --- a/dbus/dbus-bus.c +++ b/dbus/dbus-bus.c @@ -93,7 +93,7 @@ addresses_shutdown_func (void *data) while (i < N_BUS_TYPES) { if (bus_connections[i] != NULL) - _dbus_warn ("dbus_shutdown() called but connections were still live!"); + _dbus_warn_check_failed ("dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.\n"); dbus_free (bus_connection_addresses[i]); bus_connection_addresses[i] = NULL; @@ -547,10 +547,9 @@ dbus_bus_register (DBusConnection *connection, if (bd->unique_name != NULL) { - _dbus_warn ("Attempt to register the same DBusConnection with the message bus, but it is already registered\n"); - /* This isn't an error, it's a programming bug. We'll be nice - * and not _dbus_assert_not_reached() - */ + _dbus_warn_check_failed ("Attempt to register the same DBusConnection %s with the message bus a second time.\n", + bd->unique_name); + /* This isn't an error, it's a programming bug. so return TRUE */ return TRUE; } -- cgit