diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-18 04:18:57 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-18 04:18:57 +0000 |
commit | 3df260c07102745c5606c313af862558f105f83e (patch) | |
tree | b0a9d23fc820a3bc61da1cd7e63fc810423a2210 /bus | |
parent | 88cd5da3c0ec86fed29942b062c2f7bf0f8fda44 (diff) |
2003-04-18 Havoc Pennington <hp@pobox.com>
* glib/dbus-gmain.c: adapt to watch changes
* bus/bus.c, bus/activation.c, etc.: adjust to watch changes
* dbus/dbus-server.h: remove dbus_server_handle_watch
* dbus/dbus-connection.h: remove dbus_connection_handle_watch
* dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
like DBusTimeout, so we don't need dbus_connection_handle_watch
etc.
Diffstat (limited to 'bus')
-rw-r--r-- | bus/activation.c | 14 | ||||
-rw-r--r-- | bus/bus.c | 9 | ||||
-rw-r--r-- | bus/connection.c | 16 | ||||
-rw-r--r-- | bus/test.c | 16 |
4 files changed, 32 insertions, 23 deletions
diff --git a/bus/activation.c b/bus/activation.c index 0a70d6b1..a569e1a1 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -706,8 +706,18 @@ babysitter_watch_callback (DBusWatch *watch, _dbus_babysitter_ref (babysitter); - retval = _dbus_babysitter_handle_watch (babysitter, watch, condition); - + retval = dbus_watch_handle (watch, condition); + + /* FIXME this is broken in the same way that + * connection watches used to be; there should be + * a separate callback for status change, instead + * of doing "if we handled a watch status might + * have changed" + * + * Fixing this lets us move dbus_watch_handle + * calls into dbus-mainloop.c + */ + if (_dbus_babysitter_get_child_exited (babysitter)) { DBusError error; @@ -122,9 +122,12 @@ server_watch_callback (DBusWatch *watch, unsigned int condition, void *data) { - DBusServer *server = data; - - return dbus_server_handle_watch (server, watch, condition); + /* FIXME this can be done in dbus-mainloop.c + * if the code in activation.c for the babysitter + * watch handler is fixed. + */ + + return dbus_watch_handle (watch, condition); } static dbus_bool_t diff --git a/bus/connection.c b/bus/connection.c index 31fe27a0..71ab0108 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -195,15 +195,15 @@ connection_watch_callback (DBusWatch *watch, unsigned int condition, void *data) { - DBusConnection *connection = data; - dbus_bool_t retval; - + /* FIXME this can be done in dbus-mainloop.c + * if the code in activation.c for the babysitter + * watch handler is fixed. + */ + #if 0 _dbus_verbose ("Calling handle_watch\n"); #endif - retval = dbus_connection_handle_watch (connection, watch, condition); - - return retval; + return dbus_watch_handle (watch, condition); } static dbus_bool_t @@ -231,7 +231,7 @@ static void connection_timeout_callback (DBusTimeout *timeout, void *data) { - DBusConnection *connection = data; + /* DBusConnection *connection = data; */ /* can return FALSE on OOM but we just let it fire again later */ dbus_timeout_handle (timeout); @@ -815,7 +815,7 @@ bus_connection_get_name (DBusConnection *connection) return d->name; } -/** +/* * Transactions * * Note that this is fairly fragile; in particular, don't try to use @@ -40,16 +40,12 @@ client_watch_callback (DBusWatch *watch, unsigned int condition, void *data) { - DBusConnection *connection = data; - dbus_bool_t retval; - - dbus_connection_ref (connection); - - retval = dbus_connection_handle_watch (connection, watch, condition); - - dbus_connection_unref (connection); - - return retval; + /* FIXME this can be done in dbus-mainloop.c + * if the code in activation.c for the babysitter + * watch handler is fixed. + */ + + return dbus_watch_handle (watch, condition); } static dbus_bool_t |