From 0fb2684ecd436ab298e58e7fc9a3de913ccc5a08 Mon Sep 17 00:00:00 2001 From: Cosimo Alfarano Date: Mon, 3 Oct 2011 14:54:56 +0100 Subject: [PATCH 3/5] Don't run _transport_get_is_authenticated() within an assert It has collateral effects (processing the auth process when the transport is not authenticated yet), which would be not run when DBUS_DISABLE_ASSERT is set. --- dbus/dbus-connection.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 9128ffc..ab1911a 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -495,8 +495,14 @@ _dbus_connection_queue_received_message_link (DBusConnection *connection, DBusPendingCall *pending; dbus_uint32_t reply_serial; DBusMessage *message; +#ifndef DBUS_DISABLE_ASSERT + dbus_bool_t authenticated; - _dbus_assert (_dbus_transport_get_is_authenticated (connection->transport)); + authenticated = _dbus_transport_get_is_authenticated (connection->transport); + _dbus_assert (authenticated); +#else + _dbus_transport_get_is_authenticated (connection->transport); +#endif _dbus_list_append_link (&connection->incoming_messages, link); -- 1.7.6.3