diff options
author | Havoc Pennington <hp@redhat.com> | 2003-03-15 04:25:09 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-03-15 04:25:09 +0000 |
commit | 169238e99a4a163c89eb053250daeedf5f73e5cd (patch) | |
tree | 4b8f9af81765077fd9a227bae974924d905f182f /bus/dispatch.c | |
parent | 4c95a9782c65f88e2904c44abeb734a1b00f6353 (diff) | |
download | dbus-169238e99a4a163c89eb053250daeedf5f73e5cd.tar.gz |
2003-03-14 Havoc Pennington <hp@pobox.com>
* bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
transport, tests more of the real codepath. Set up clients
with bus_setup_debug_client.
* bus/test.c (bus_setup_debug_client): function to set up debug
"clients" on the main loop
* dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
support
* dbus/dbus-server.c (dbus_server_listen): add debug-pipe
server type
* dbus/dbus-server-debug.c: support a debug server based on pipes
* dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
(_dbus_close): new function
* configure.in: check for socketpair
Diffstat (limited to 'bus/dispatch.c')
-rw-r--r-- | bus/dispatch.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bus/dispatch.c b/bus/dispatch.c index 928e4387..35ea5549 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -379,7 +379,7 @@ bus_dispatch_remove_connection (DBusConnection *connection) static void flush_bus (BusContext *context) -{ +{ while (bus_loop_iterate (FALSE)) ; } @@ -435,23 +435,28 @@ bus_dispatch_test (const DBusString *test_data_dir) DBusResultCode result; dbus_error_init (&error); - context = bus_context_new ("debug:name=test-server", + context = bus_context_new ("debug-pipe:name=test-server", activation_dirs, &error); if (context == NULL) _dbus_assert_not_reached ("could not alloc context"); - foo = dbus_connection_open ("debug:name=test-server", &result); + foo = dbus_connection_open ("debug-pipe:name=test-server", &result); if (foo == NULL) _dbus_assert_not_reached ("could not alloc connection"); - bar = dbus_connection_open ("debug:name=test-server", &result); + bar = dbus_connection_open ("debug-pipe:name=test-server", &result); if (bar == NULL) _dbus_assert_not_reached ("could not alloc connection"); - baz = dbus_connection_open ("debug:name=test-server", &result); + baz = dbus_connection_open ("debug-pipe:name=test-server", &result); if (baz == NULL) _dbus_assert_not_reached ("could not alloc connection"); + + if (!bus_setup_debug_client (foo) || + !bus_setup_debug_client (bar) || + !bus_setup_debug_client (baz)) + _dbus_assert_not_reached ("could not set up connection"); if (!check_hello_message (context, foo)) _dbus_assert_not_reached ("hello message failed"); |