summaryrefslogtreecommitdiff
path: root/bus/dispatch.c
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2009-12-01 11:17:17 +0100
committerRalf Habacker <ralf.habacker@freenet.de>2009-12-01 11:17:40 +0100
commit73b926275f7208f4663771b98a580f10e3aebb18 (patch)
treeeeeba5a8f22221af563a2625cb7a0fd2032aa2a7 /bus/dispatch.c
parent0992fb826d14fb138722feaf60903b58fef72e5e (diff)
downloaddbus-73b926275f7208f4663771b98a580f10e3aebb18.tar.gz
uses tcp based test connections for now
Diffstat (limited to 'bus/dispatch.c')
-rw-r--r--bus/dispatch.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/bus/dispatch.c b/bus/dispatch.c
index 9ad494b5..f769a44d 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -40,6 +40,12 @@
#include <unistd.h>
#endif
+#ifdef DBUS_UNIX
+#define TEST_CONNECTION "debug-pipe:name=test-server"
+#else
+#define TEST_CONNECTION "tcp:host=localhost,port=1234"
+#endif
+
static dbus_bool_t
send_one_message (DBusConnection *connection,
BusContext *context,
@@ -1513,7 +1519,7 @@ check_hello_connection (BusContext *context)
dbus_error_init (&error);
- connection = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ connection = dbus_connection_open_private (TEST_CONNECTION, &error);
if (connection == NULL)
{
_DBUS_ASSERT_ERROR_IS_SET (&error);
@@ -4482,7 +4488,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
if (context == NULL)
return FALSE;
- foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ foo = dbus_connection_open_private (TEST_CONNECTION, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
@@ -4500,7 +4506,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
if (!check_add_match_all (context, foo))
_dbus_assert_not_reached ("AddMatch message failed");
- bar = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ bar = dbus_connection_open_private (TEST_CONNECTION, &error);
if (bar == NULL)
_dbus_assert_not_reached ("could not alloc connection");
@@ -4515,7 +4521,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
if (!check_add_match_all (context, bar))
_dbus_assert_not_reached ("AddMatch message failed");
- baz = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ baz = dbus_connection_open_private (TEST_CONNECTION, &error);
if (baz == NULL)
_dbus_assert_not_reached ("could not alloc connection");
@@ -4626,7 +4632,7 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir,
if (context == NULL)
return FALSE;
- foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ foo = dbus_connection_open_private (TEST_CONNECTION, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
@@ -4705,7 +4711,7 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir)
if (context == NULL)
return FALSE;
- foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ foo = dbus_connection_open_private (TEST_CONNECTION, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
@@ -4755,7 +4761,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
if (context == NULL)
_dbus_assert_not_reached ("could not alloc context");
- foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ foo = dbus_connection_open_private (TEST_CONNECTION, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
@@ -4770,7 +4776,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
if (!check_add_match_all (context, foo))
_dbus_assert_not_reached ("AddMatch message failed");
- bar = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+ bar = dbus_connection_open_private (TEST_CONNECTION, &error);
if (bar == NULL)
_dbus_assert_not_reached ("could not alloc connection");