From e8d396efef695b9868b0112c4a6266c97678fa8a Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 27 Apr 2003 06:25:42 +0000 Subject: 2003-04-27 Havoc Pennington Unbreak my code... * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status): report correct status if we finish processing authentication inside this function. * bus/activation.c (try_send_activation_failure): use bus_transaction_send_error_reply * bus/connection.c (bus_connection_get_groups): return an error explaining the problem * bus/bus.c (bus_context_check_security_policy): implement restriction here that inactive connections can only send the hello message. Also, allow bus driver to send anything to any recipient. * bus/connection.c (bus_connection_complete): create the BusClientPolicy here instead of on-demand. (bus_connection_get_policy): don't return an error * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL sender field in message being replied to * bus/bus.c (bus_context_check_security_policy): fix silly typo causing it to return FALSE always * bus/policy.c (bus_client_policy_check_can_send): fix bug where we checked sender rather than destination --- bus/activation.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'bus/activation.c') diff --git a/bus/activation.c b/bus/activation.c index c50f1f28..3682eecc 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -641,7 +641,6 @@ try_send_activation_failure (BusPendingActivation *pending_activation, const DBusError *how) { BusActivation *activation; - DBusMessage *message; DBusList *link; BusTransaction *transaction; @@ -659,21 +658,13 @@ try_send_activation_failure (BusPendingActivation *pending_activation, if (dbus_connection_get_is_connected (entry->connection)) { - message = dbus_message_new_error_reply (entry->activation_message, - how->name, - how->message); - if (!message) + if (!bus_transaction_send_error_reply (transaction, + entry->connection, + how, + entry->activation_message)) goto error; - - if (!bus_transaction_send_from_driver (transaction, entry->connection, message)) - { - dbus_message_unref (message); - goto error; - } - - dbus_message_unref (message); } - + link = next; } -- cgit