From eb9aa9da9564f2df788580394e67ae6105e517fb Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 22 Oct 2003 16:01:08 +0000 Subject: 2003-10-22 Havoc Pennington * bus/bus.c (bus_context_check_security_policy): fix up assertion * bus/connection.c (bus_transaction_send_from_driver): set the destination to the connection's base service --- bus/bus.c | 4 ++-- bus/connection.c | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'bus') diff --git a/bus/bus.c b/bus/bus.c index 43882c59..69359456 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -919,9 +919,9 @@ bus_context_check_security_policy (BusContext *context, type = dbus_message_get_type (message); /* dispatch.c was supposed to ensure these invariants */ - /* FIXME this assertion is failing in make check */ _dbus_assert (dbus_message_get_destination (message) != NULL || - type == DBUS_MESSAGE_TYPE_SIGNAL); + type == DBUS_MESSAGE_TYPE_SIGNAL || + (sender == NULL && !bus_connection_is_active (proposed_recipient))); _dbus_assert (type == DBUS_MESSAGE_TYPE_SIGNAL || addressed_recipient != NULL || strcmp (dbus_message_get_destination (message), DBUS_SERVICE_ORG_FREEDESKTOP_DBUS) == 0); diff --git a/bus/connection.c b/bus/connection.c index 65ebdb28..db9cbaa8 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -1862,6 +1862,13 @@ bus_transaction_send_from_driver (BusTransaction *transaction, if (!dbus_message_set_sender (message, DBUS_SERVICE_ORG_FREEDESKTOP_DBUS)) return FALSE; + if (bus_connection_is_active (connection)) + { + if (!dbus_message_set_destination (message, + bus_connection_get_name (connection))) + return FALSE; + } + /* bus driver never wants a reply */ dbus_message_set_no_reply (message, TRUE); -- cgit