diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-06-21 23:58:20 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2016-06-23 18:49:56 -0400 |
commit | 7e2eb6ad2402eee80fd4adc8b62b9d0f15905e7d (patch) | |
tree | 55aa02c047dcd28c2e5d06ebf8a5d14e699d91d3 /tests/test-turn.c | |
parent | ea3d7e0de9568a4ec54a05e102ba4880cb825792 (diff) | |
download | libnice-7e2eb6ad2402eee80fd4adc8b62b9d0f15905e7d.tar.gz |
test-turn: wait for gathering done sequentially
Fixes a bug in the logic of the wait loop, where only a single
gathering done was required to exit the loop, the other was caught
by the following assert.
Differential Revision: https://phabricator.freedesktop.org/D1110
Diffstat (limited to 'tests/test-turn.c')
-rw-r--r-- | tests/test-turn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-turn.c b/tests/test-turn.c index 46d1bf2..c466261 100644 --- a/tests/test-turn.c +++ b/tests/test-turn.c @@ -224,9 +224,11 @@ run_test(guint turn_port, gboolean is_ipv6, g_assert (global_lagent_gathering_done == FALSE); g_assert (global_ragent_gathering_done == FALSE); g_debug ("test-turn: Added streams, running context until 'candidate-gathering-done'..."); - while (!global_lagent_gathering_done && !global_ragent_gathering_done) + while (!global_lagent_gathering_done) g_main_context_iteration (NULL, TRUE); g_assert (global_lagent_gathering_done == TRUE); + while (!global_ragent_gathering_done) + g_main_context_iteration (NULL, TRUE); g_assert (global_ragent_gathering_done == TRUE); set_credentials (lagent, ls_id, ragent, rs_id); |