summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-server.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-14 01:27:58 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-14 01:27:58 +0000
commit3bea935316ff048e68dea6a26c2e8e9fd314477f (patch)
tree498e62121c89d78693070d04e6bc6a6462efe2a7 /dbus/dbus-server.c
parent81c30364c291045d556c88f6818033104e627b6e (diff)
2003-03-13 Havoc Pennington <hp@redhat.com>
* dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle out of memory * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out of memory * dbus/dbus-connection.h: Make AddWatchFunction and AddTimeoutFunction return a bool so they can fail on out-of-memory * bus/bus.c (bus_context_new): set up timeout handlers * bus/connection.c (bus_connections_setup_connection): set up timeout handlers * glib/dbus-gmain.c: adapt to the fact that set_functions stuff can fail * bus/bus.c (bus_context_new): adapt to changes * bus/connection.c: adapt to changes * test/watch.c: adapt to DBusWatch changes * bus/dispatch.c (bus_dispatch_test): started adding this but didn't finish
Diffstat (limited to 'dbus/dbus-server.c')
-rw-r--r--dbus/dbus-server.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c
index 0065e510..99a5a2af 100644
--- a/dbus/dbus-server.c
+++ b/dbus/dbus-server.c
@@ -392,19 +392,20 @@ dbus_server_set_new_connection_function (DBusServer *server,
* @param remove_function function to stop monitoring a descriptor.
* @param data data to pass to add_function and remove_function.
* @param free_data_function function to be called to free the data.
+ * @returns #FALSE on failure (no memory)
*/
-void
+dbus_bool_t
dbus_server_set_watch_functions (DBusServer *server,
DBusAddWatchFunction add_function,
DBusRemoveWatchFunction remove_function,
void *data,
DBusFreeFunction free_data_function)
{
- _dbus_watch_list_set_functions (server->watches,
- add_function,
- remove_function,
- data,
- free_data_function);
+ return _dbus_watch_list_set_functions (server->watches,
+ add_function,
+ remove_function,
+ data,
+ free_data_function);
}
/**
@@ -419,17 +420,18 @@ dbus_server_set_watch_functions (DBusServer *server,
* @param remove_function function to remove a timeout.
* @param data data to pass to add_function and remove_function.
* @param free_data_function function to be called to free the data.
+ * @returns #FALSE on failure (no memory)
*/
-void
+dbus_bool_t
dbus_server_set_timeout_functions (DBusServer *server,
DBusAddTimeoutFunction add_function,
DBusRemoveTimeoutFunction remove_function,
void *data,
DBusFreeFunction free_data_function)
{
- _dbus_timeout_list_set_functions (server->timeouts,
- add_function, remove_function,
- data, free_data_function);
+ return _dbus_timeout_list_set_functions (server->timeouts,
+ add_function, remove_function,
+ data, free_data_function);
}
/**