From 6cf6f82faae928a9142d4aa465b5add381960e29 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 16 Feb 2003 21:50:32 +0000 Subject: 2003-02-16 Anders Carlsson * 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. --- bus/dispatch.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bus') diff --git a/bus/dispatch.c b/bus/dispatch.c index 2ce26ae1..76e10a9f 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -33,6 +33,10 @@ static int message_handler_slot; static void send_one_message (DBusConnection *connection, void *data) { + /* Only send messages to registered connections */ + if (bus_connection_get_name (connection) == NULL) + return; + BUS_HANDLE_OOM (dbus_connection_send_message (connection, data, NULL, NULL)); } -- cgit