From 3df260c07102745c5606c313af862558f105f83e Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 18 Apr 2003 04:18:57 +0000 Subject: 2003-04-18 Havoc Pennington * 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. --- dbus/dbus-transport-unix.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'dbus/dbus-transport-unix.c') diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c index 82b28e0d..37012b88 100644 --- a/dbus/dbus-transport-unix.c +++ b/dbus/dbus-transport-unix.c @@ -786,6 +786,14 @@ static dbus_bool_t unix_connection_set (DBusTransport *transport) { DBusTransportUnix *unix_transport = (DBusTransportUnix*) transport; + + _dbus_watch_set_handler (unix_transport->write_watch, + _dbus_connection_handle_watch, + transport->connection, NULL); + + _dbus_watch_set_handler (unix_transport->read_watch, + _dbus_connection_handle_watch, + transport->connection, NULL); if (!_dbus_connection_add_watch (transport->connection, unix_transport->write_watch)) @@ -1018,13 +1026,15 @@ _dbus_transport_new_for_fd (int fd, unix_transport->write_watch = _dbus_watch_new (fd, DBUS_WATCH_WRITABLE, - FALSE); + FALSE, + NULL, NULL, NULL); if (unix_transport->write_watch == NULL) goto failed_2; unix_transport->read_watch = _dbus_watch_new (fd, DBUS_WATCH_READABLE, - FALSE); + FALSE, + NULL, NULL, NULL); if (unix_transport->read_watch == NULL) goto failed_3; -- cgit