summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-11-02 12:44:08 +0100
committerXavier Claessens <xclaesse@gmail.com>2011-11-07 14:34:52 +0100
commit4de1cf73eaa89f75e540387be8c57e8fc34b343d (patch)
treeabcc149b2bda2675f799f9167d1cb2cebf38e184 /tests
parentdedce116cc8b592743cb599bda3e6aa32c5be730 (diff)
Fix race condition when an observer calls claim_with then accept the contextHEADmaster
tp_channel_dispatch_operation_claim_with_async() were preparing itself as first step, which means the dbus call is not made directly, and the tp_observer_context_accept() dbus message could get to MC first, making MC dispatch the channel to any capable handler. There is no reason to prepare self in _async calls, caller is responsible for that. Fixes fd.o#42503
Diffstat (limited to 'tests')
-rw-r--r--tests/dbus/channel-dispatch-operation.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/dbus/channel-dispatch-operation.c b/tests/dbus/channel-dispatch-operation.c
index 734e23ac..02be514d 100644
--- a/tests/dbus/channel-dispatch-operation.c
+++ b/tests/dbus/channel-dispatch-operation.c
@@ -816,6 +816,8 @@ test_close_channels (Test *test,
"/whatever", NULL, &test->error);
g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->cdo, NULL);
+
g_signal_connect (test->text_chan, "invalidated",
G_CALLBACK (channel_invalidated_cb), test);
g_signal_connect (test->text_chan_2, "invalidated",
@@ -853,6 +855,8 @@ test_leave_channels (Test *test,
"/whatever", NULL, &test->error);
g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->cdo, NULL);
+
g_signal_connect (test->text_chan, "invalidated",
G_CALLBACK (channel_invalidated_cb), test);
g_signal_connect (test->text_chan_2, "invalidated",
@@ -891,6 +895,8 @@ test_destroy_channels (Test *test,
"/whatever", NULL, &test->error);
g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->cdo, NULL);
+
g_signal_connect (test->text_chan, "invalidated",
G_CALLBACK (channel_invalidated_cb), test);
g_signal_connect (test->text_chan_2, "invalidated",