From 4de1cf73eaa89f75e540387be8c57e8fc34b343d Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 2 Nov 2011 12:44:08 +0100 Subject: Fix race condition when an observer calls claim_with then accept the context 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 --- tests/dbus/channel-dispatch-operation.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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", -- cgit v1.2.3