summaryrefslogtreecommitdiffstats
path: root/bus
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2005-11-07 21:57:13 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2005-11-07 21:57:13 +0000
commit45ef0fbc4f0f5441425484be3662b2c44d2554b3 (patch)
treee6bf3fe63741b8038c27dd889258e831de5b772a /bus
parente598c5edc5b4d3fa7eb474ab3cd93ec6747e4bc0 (diff)
* bus/driver.c (bus_driver_handle_reload_config): Make sure we send an
empty reply so blocking calls don't block forever (Patch from Sjoerd Simons <sjoerd at luon.net>) * AUTHORS: Add Robert McQueen for his work on the Python Bindings and other parts of D-Bus
Diffstat (limited to 'bus')
-rw-r--r--bus/driver.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/bus/driver.c b/bus/driver.c
index 9e8df517..a6c4faff 100644
--- a/bus/driver.c
+++ b/bus/driver.c
@@ -1094,23 +1094,34 @@ bus_driver_handle_reload_config (DBusConnection *connection,
DBusError *error)
{
BusContext *context;
- dbus_bool_t retval;
+ DBusMessage *reply;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
- retval = FALSE;
-
+ reply = NULL;
+
context = bus_connection_get_context (connection);
if (!bus_context_reload_config (context, error))
- {
- _DBUS_ASSERT_ERROR_IS_SET (error);
- goto out;
- }
+ goto failed;
- retval = TRUE;
-
- out:
- return retval;
+ reply = dbus_message_new_method_return (message);
+ if (reply == NULL)
+ goto oom;
+
+ if (! bus_transaction_send_from_driver (transaction, connection, reply))
+ goto oom;
+
+ dbus_message_unref (reply);
+ return TRUE;
+
+ oom:
+ BUS_SET_OOM (error);
+
+ failed:
+ _DBUS_ASSERT_ERROR_IS_SET (error);
+ if (reply)
+ dbus_message_unref (reply);
+ return FALSE;
}
/* For speed it might be useful to sort this in order of