summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-06-21 07:51:39 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-06-21 07:51:39 +0000
commited70a30a727280a07a5964107bf9ee11f65ce478 (patch)
tree7bda96ae79aef75ad49e6d2f6fc632d0aab97d8f
parente94493fc116955bbf72a8896c48f2c119efacf7f (diff)
downloaddbus-ed70a30a727280a07a5964107bf9ee11f65ce478.tar.gz
2003-06-20 Anders Carlsson <andersca@codefactory.se>
* 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.
-rw-r--r--ChangeLog6
-rw-r--r--dbus/dbus-transport-unix.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index eb7cd6d2..c9343bf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-20 Anders Carlsson <andersca@codefactory.se>
+
+ * 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.
+
2003-06-19 Philip Blundell <philb@gnu.org>
* tools/dbus-print-message.c (print_message): Handle BOOLEAN.
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;
}