diff options
author | Havoc Pennington <hp@redhat.com> | 2003-03-17 01:54:37 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-03-17 01:54:37 +0000 |
commit | b4a1100f4f81534e2aac0141afda750f318223d4 (patch) | |
tree | 9573e47181fc32c40f4784df0d22b2c6ee4143c4 /bus/connection.c | |
parent | 3caaa342e8db2cba690bb9e1a228ef3862e203d8 (diff) | |
download | dbus-b4a1100f4f81534e2aac0141afda750f318223d4.tar.gz |
2003-03-16 Havoc Pennington <hp@pobox.com>
* dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
the watch
* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
add some missing dbus_set_result
* bus/dispatch.c (bus_dispatch_add_connection): handle failure to
alloc the DBusMessageHandler
* dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
the transport here, since we call this from the finalizer; it
resulted in a double-finalize.
* dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
where we tried to use transport->connection that was NULL,
happened when transport was disconnected early on due to OOM
* bus/*.c: adapt to handle OOM for watches/timeouts
* dbus/dbus-transport-unix.c: port to handle OOM during
watch handling
* dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
reference to unused bytes instead of a copy
* dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
out of memory
* dbus/dbus-connection.c (dbus_connection_handle_watch): return
FALSE on OOM
* dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
of memory
Diffstat (limited to 'bus/connection.c')
-rw-r--r-- | bus/connection.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bus/connection.c b/bus/connection.c index 80afc7e1..a8616683 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -133,20 +133,23 @@ bus_connection_disconnected (DBusConnection *connection) dbus_connection_unref (connection); } -static void +static dbus_bool_t connection_watch_callback (DBusWatch *watch, unsigned int condition, void *data) { DBusConnection *connection = data; + dbus_bool_t retval; dbus_connection_ref (connection); - dbus_connection_handle_watch (connection, watch, condition); + retval = dbus_connection_handle_watch (connection, watch, condition); bus_connection_dispatch_all_messages (connection); dbus_connection_unref (connection); + + return retval; } static dbus_bool_t @@ -171,7 +174,8 @@ connection_timeout_callback (DBusTimeout *timeout, DBusConnection *connection = data; dbus_connection_ref (connection); - + + /* can return FALSE on OOM but we just let it fire again later */ dbus_timeout_handle (timeout); bus_connection_dispatch_all_messages (connection); |