From ed70a30a727280a07a5964107bf9ee11f65ce478 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 21 Jun 2003 07:51:39 +0000 Subject: 2003-06-20 Anders Carlsson * dbus/dbus-transport-unix.c (unix_handle_watch): Check for hangup and error after checking read so we won't discard pending data if both hangup and read are set. --- dbus/dbus-transport-unix.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dbus') diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c index e5e446c2..40c7a5df 100644 --- a/dbus/dbus-transport-unix.c +++ b/dbus/dbus-transport-unix.c @@ -727,12 +727,6 @@ unix_handle_watch (DBusTransport *transport, _dbus_assert (watch == unix_transport->read_watch || watch == unix_transport->write_watch); - if (flags & (DBUS_WATCH_HANGUP | DBUS_WATCH_ERROR)) - { - _dbus_transport_disconnect (transport); - return TRUE; - } - if (watch == unix_transport->read_watch && (flags & DBUS_WATCH_READABLE)) { @@ -779,6 +773,12 @@ unix_handle_watch (DBusTransport *transport, } #endif /* DBUS_ENABLE_VERBOSE_MODE */ + if (flags & (DBUS_WATCH_HANGUP | DBUS_WATCH_ERROR)) + { + _dbus_transport_disconnect (transport); + return TRUE; + } + return TRUE; } -- cgit