diff options
author | Anders Carlsson <andersca@codefactory.se> | 2003-02-16 21:50:32 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@codefactory.se> | 2003-02-16 21:50:32 +0000 |
commit | 6cf6f82faae928a9142d4aa465b5add381960e29 (patch) | |
tree | 4275653da460d9f96639e7c246f82dd1c6e233a9 /dbus/dbus-transport-debug.c | |
parent | b2fce4c69b9fd75c54bb370e043ea166b83083f6 (diff) |
2003-02-16 Anders Carlsson <andersca@codefactory.se>
* bus/dispatch.c: (send_one_message):
Only send broadcast messages to registered connections.
* dbus/dbus-message.c: (dbus_message_name_is):
* dbus/dbus-message.h:
New convenience function.
* dbus/dbus-transport-debug.c: (do_reading):
Only dispatch one message per run.
* test/Makefile.am:
* test/bus-test.c: (new_connection_callback), (die),
(test_hello_client1_handler), (test_hello_client2_handler),
(test_hello_replies), (main):
* test/bus-test-loop.[ch]:
Add these.
Diffstat (limited to 'dbus/dbus-transport-debug.c')
-rw-r--r-- | dbus/dbus-transport-debug.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/dbus/dbus-transport-debug.c b/dbus/dbus-transport-debug.c index f829fc29..e0a90644 100644 --- a/dbus/dbus-transport-debug.c +++ b/dbus/dbus-transport-debug.c @@ -76,11 +76,24 @@ debug_finalize (DBusTransport *transport) static void do_reading (DBusTransport *transport) { + DBusTransportDebug *debug_transport = (DBusTransportDebug*) transport; + if (transport->disconnected) return; /* Now dispatch the messages */ - while (dbus_connection_dispatch_message (transport->connection)); + if (dbus_connection_dispatch_message (transport->connection)) + { + debug_transport->read_timeout = + _dbus_timeout_new (DEFAULT_INTERVAL, (DBusTimeoutHandler)do_reading, + transport, NULL); + if (!_dbus_connection_add_timeout (transport->connection, + debug_transport->read_timeout)) + { + _dbus_timeout_unref (debug_transport->read_timeout); + debug_transport->read_timeout = NULL; + } + } } static void |