summaryrefslogtreecommitdiff
path: root/dbus/dbus-transport-unix.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-05-16 20:09:25 +0000
committerHavoc Pennington <hp@redhat.com>2003-05-16 20:09:25 +0000
commit306eab3e3d998472ad111146a12b7697ea96c9b9 (patch)
tree613b5918113060fb66b7122307d8a6d2c2c2344f /dbus/dbus-transport-unix.c
parentce53bbd7af4488b8374aeccc2e80fb2f7eff0683 (diff)
downloaddbus-306eab3e3d998472ad111146a12b7697ea96c9b9.tar.gz
2003-05-16 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c: disable verbose lock spew * tools/dbus-send.c: add --print-reply command line option * tools/dbus-print-message.h (print_message): new util function shared by dbus-send and dbus-monitor * tools/dbus-monitor.c (handler_func): exit on disconnect * dbus/dbus-transport-unix.c (do_reading): if the transport is disconnected, don't try to use the read_watch * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL so we can find this bug more easily
Diffstat (limited to 'dbus/dbus-transport-unix.c')
-rw-r--r--dbus/dbus-transport-unix.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c
index fbf334e4..5df1c461 100644
--- a/dbus/dbus-transport-unix.c
+++ b/dbus/dbus-transport-unix.c
@@ -593,11 +593,9 @@ do_reading (DBusTransport *transport)
total = 0;
again:
-
+
/* See if we've exceeded max messages and need to disable reading */
check_read_watch (transport);
- if (!dbus_watch_get_enabled (unix_transport->read_watch))
- return TRUE;
if (total > unix_transport->max_bytes_read_per_iteration)
{
@@ -606,9 +604,15 @@ do_reading (DBusTransport *transport)
goto out;
}
+ _dbus_assert (unix_transport->read_watch != NULL ||
+ transport->disconnected);
+
if (transport->disconnected)
goto out;
+ if (!dbus_watch_get_enabled (unix_transport->read_watch))
+ return TRUE;
+
if (_dbus_auth_needs_decoding (transport->auth))
{
if (_dbus_string_get_length (&unix_transport->encoded_incoming) > 0)