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 /dbus/dbus-spawn.c | |
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 'dbus/dbus-spawn.c')
-rw-r--r-- | dbus/dbus-spawn.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index c36e6000..7161e6ed 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -678,20 +678,12 @@ _dbus_babysitter_set_watch_functions (DBusBabysitter *sitter, free_data_function); } -/** - * Handles watch when descriptors are ready. - * - * @param sitter the babysitter. - * @param watch the watch object - * @param condition the descriptor conditions - * @returns #FALSE if there wasn't enough memory. - * - */ -dbus_bool_t -_dbus_babysitter_handle_watch (DBusBabysitter *sitter, - DBusWatch *watch, - unsigned int condition) +static dbus_bool_t +handle_watch (DBusWatch *watch, + unsigned int condition, + void *data) { + DBusBabysitter *sitter = data; int revents; int fd; @@ -1051,7 +1043,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, */ sitter->error_watch = _dbus_watch_new (child_err_report_pipe[READ_END], DBUS_WATCH_READABLE, - TRUE); + TRUE, handle_watch, sitter, NULL); if (sitter->error_watch == NULL) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); @@ -1066,7 +1058,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, sitter->sitter_watch = _dbus_watch_new (babysitter_pipe[0], DBUS_WATCH_READABLE, - TRUE); + TRUE, handle_watch, sitter, NULL); if (sitter->sitter_watch == NULL) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); |