Commit 7e2eb6ad authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

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
parent ea3d7e0d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment