Commit 77e9d0b1 authored by Youness Alaoui's avatar Youness Alaoui

test-fullmode: remove the old code that sets candidates from one agent to...

test-fullmode: remove the old code that sets candidates from one agent to another and do it properly
parent 2da67c9d
...@@ -272,63 +272,39 @@ static void cb_initial_binding_request_received(NiceAgent *agent, guint stream_i ...@@ -272,63 +272,39 @@ static void cb_initial_binding_request_received(NiceAgent *agent, guint stream_i
(void)agent; (void)stream_id; (void)data; (void)agent; (void)stream_id; (void)data;
} }
static void priv_get_local_addr (NiceAgent *agent, guint stream_id, guint component_id, NiceAddress *dstaddr) static void set_candidates (NiceAgent *from, guint from_stream,
NiceAgent *to, guint to_stream, guint component)
{ {
GSList *cands, *i; GSList *cands = NULL, *i;
cands = nice_agent_get_local_candidates(agent, stream_id, component_id);
for (i = cands; i; i = i->next) {
NiceCandidate *cand = i->data;
if (cand) {
g_assert (dstaddr);
*dstaddr = cand->addr;
}
}
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
}
static GSList *priv_get_local_candidate (NiceAgent *agent, guint stream_id, guint component_id) cands = nice_agent_get_local_candidates (from, from_stream, component);
{ #if USE_TURN
GSList *cands, *i; restart:
GSList *result = NULL; g_debug ("%d candidates : %p ", g_slist_length (cands), cands);
NiceCandidate *out_cand = NULL;
cands = nice_agent_get_local_candidates(agent, stream_id, component_id);
for (i = cands; i; i = i->next) { for (i = cands; i; i = i->next) {
NiceCandidate *cand = i->data; NiceCandidate *cand = i->data;
if (cand) { g_debug ("candidate of type %d", cand->type);
out_cand = cand; if (cand->type != NICE_CANDIDATE_TYPE_RELAYED) {
g_debug ("Removing");
cands = g_slist_remove (cands, cand);
nice_candidate_free (cand);
goto restart;
} }
} }
result = g_slist_append (result, nice_candidate_copy (out_cand)); #endif
nice_agent_set_remote_candidates (to, to_stream, component, cands);
for (i = cands; i; i = i->next) for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data); nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands); g_slist_free (cands);
return result;
} }
static void init_candidate (NiceCandidate *cand)
{
memset (cand, 0, sizeof(NiceCandidate));
cand->priority = 10000;
strcpy (cand->foundation, "1");
cand->type = NICE_CANDIDATE_TYPE_HOST;
cand->transport = NICE_CANDIDATE_TRANSPORT_UDP;
}
static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr, guint ready, guint failed) static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr, guint ready, guint failed)
{ {
// NiceAddress laddr, raddr, laddr_rtcp, raddr_rtcp;
NiceCandidate cdes;
GSList *cands, *i;
guint ls_id, rs_id; guint ls_id, rs_id;
gint ret; gint ret;
init_candidate (&cdes);
/* XXX: dear compiler, this is for you */ /* XXX: dear compiler, this is for you */
(void)baseaddr; (void)baseaddr;
...@@ -392,26 +368,8 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas ...@@ -392,26 +368,8 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas
g_assert (global_ragent_gathering_done == TRUE); g_assert (global_ragent_gathering_done == TRUE);
} }
/* step: find out the local candidates of each agent */
/* priv_get_local_addr (ragent, rs_id, NICE_COMPONENT_TYPE_RTP, &raddr);
g_debug ("test-fullmode: local RTP port R %u",
nice_address_get_port (&raddr));
priv_get_local_addr (lagent, ls_id, NICE_COMPONENT_TYPE_RTP, &laddr);
g_debug ("test-fullmode: local RTP port L %u",
nice_address_get_port (&laddr));
priv_get_local_addr (ragent, rs_id, NICE_COMPONENT_TYPE_RTCP, &raddr_rtcp);
g_debug ("test-fullmode: local RTCP port R %u",
nice_address_get_port (&raddr_rtcp));
priv_get_local_addr (lagent, ls_id, NICE_COMPONENT_TYPE_RTCP, &laddr_rtcp);
g_debug ("test-fullmode: local RTCP port L %u",
nice_address_get_port (&laddr_rtcp));*/
/* step: pass the remote candidates to agents */ /* step: pass the remote candidates to agents */
//cands = g_slist_append (NULL, &cdes);
{ {
gchar *ufrag = NULL, *password = NULL; gchar *ufrag = NULL, *password = NULL;
nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password); nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password);
...@@ -425,38 +383,10 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas ...@@ -425,38 +383,10 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas
g_free (ufrag); g_free (ufrag);
g_free (password); g_free (password);
} }
/* cdes.component_id = NICE_COMPONENT_TYPE_RTP; set_candidates (ragent, rs_id, lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
cdes.addr = raddr; set_candidates (ragent, rs_id, lagent, ls_id, NICE_COMPONENT_TYPE_RTCP);
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTP, cands); set_candidates (lagent, ls_id, ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
cdes.addr = laddr; set_candidates (lagent, ls_id, ragent, rs_id, NICE_COMPONENT_TYPE_RTCP);
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTP, cands);
cdes.component_id = NICE_COMPONENT_TYPE_RTCP;
cdes.addr = raddr_rtcp;
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTCP, cands);
cdes.addr = laddr_rtcp;
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTCP, cands);
g_slist_free (cands);*/
cands = priv_get_local_candidate (ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTP, cands);
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
cands = priv_get_local_candidate (ragent, rs_id, NICE_COMPONENT_TYPE_RTCP);
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTCP, cands);
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
cands = priv_get_local_candidate (lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTP, cands);
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
cands = priv_get_local_candidate (lagent, ls_id, NICE_COMPONENT_TYPE_RTCP);
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTCP, cands);
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
g_debug ("test-fullmode: Set properties, next running mainloop until connectivity checks succeed..."); g_debug ("test-fullmode: Set properties, next running mainloop until connectivity checks succeed...");
...@@ -506,14 +436,9 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas ...@@ -506,14 +436,9 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas
*/ */
static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr, guint ready, guint failed) static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr, guint ready, guint failed)
{ {
NiceAddress laddr, raddr, laddr_rtcp, raddr_rtcp;
NiceCandidate cdes;
GSList *cands;
guint ls_id, rs_id; guint ls_id, rs_id;
gint ret; gint ret;
init_candidate (&cdes);
/* XXX: dear compiler, this is for you */ /* XXX: dear compiler, this is for you */
(void)baseaddr; (void)baseaddr;
...@@ -527,7 +452,7 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -527,7 +452,7 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
global_lagent_ibr_received = global_lagent_ibr_received =
global_ragent_ibr_received = FALSE; global_ragent_ibr_received = FALSE;
global_exit_when_ibr_received = 1; global_exit_when_ibr_received = 1;
global_lagent_cands = global_lagent_cands =
global_ragent_cands = 0; global_ragent_cands = 0;
g_object_set (G_OBJECT (lagent), "controlling-mode", TRUE, NULL); g_object_set (G_OBJECT (lagent), "controlling-mode", TRUE, NULL);
...@@ -561,7 +486,7 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -561,7 +486,7 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
g_main_loop_get_context (global_mainloop), cb_nice_recv, g_main_loop_get_context (global_mainloop), cb_nice_recv,
GUINT_TO_POINTER (2)); GUINT_TO_POINTER (2));
/* step: run mainloop until local candidates are ready /* step: run mainloop until local candidates are ready
* (see timer_cb() above) */ * (see timer_cb() above) */
if (global_lagent_gathering_done != TRUE || if (global_lagent_gathering_done != TRUE ||
global_ragent_gathering_done != TRUE) { global_ragent_gathering_done != TRUE) {
...@@ -573,23 +498,6 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -573,23 +498,6 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
/* step: find out the local candidates of each agent */ /* step: find out the local candidates of each agent */
priv_get_local_addr (ragent, rs_id, NICE_COMPONENT_TYPE_RTP, &raddr);
g_debug ("test-fullmode: local RTP port R %u",
nice_address_get_port (&raddr));
priv_get_local_addr (lagent, ls_id, NICE_COMPONENT_TYPE_RTP, &laddr);
g_debug ("test-fullmode: local RTP port L %u",
nice_address_get_port (&laddr));
priv_get_local_addr (ragent, rs_id, NICE_COMPONENT_TYPE_RTCP, &raddr_rtcp);
g_debug ("test-fullmode: local RTCP port R %u",
nice_address_get_port (&raddr_rtcp));
priv_get_local_addr (lagent, ls_id, NICE_COMPONENT_TYPE_RTCP, &laddr_rtcp);
g_debug ("test-fullmode: local RTCP port L %u",
nice_address_get_port (&laddr_rtcp));
/* step: pass the remote candidates to agent R (answering party) */
{ {
gchar *ufrag = NULL, *password = NULL; gchar *ufrag = NULL, *password = NULL;
nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password); nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password);
...@@ -604,17 +512,8 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -604,17 +512,8 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
g_free (password); g_free (password);
} }
/* step: set remote candidates for agent R (answering party) */ /* step: set remote candidates for agent R (answering party) */
/* set_candidates (lagent, ls_id, ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
cands = g_slist_append (NULL, &cdes); set_candidates (lagent, ls_id, ragent, rs_id, NICE_COMPONENT_TYPE_RTCP);
cdes.component_id = NICE_COMPONENT_TYPE_RTP;
cdes.addr = laddr;*/
cands = priv_get_local_candidate (lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTP, cands);
/*cdes.component_id = NICE_COMPONENT_TYPE_RTCP;
cdes.addr = laddr_rtcp;*/
cands = priv_get_local_candidate (lagent, ls_id, NICE_COMPONENT_TYPE_RTCP);
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTCP, cands);
g_debug ("test-fullmode: Set properties, next running mainloop until first check is received..."); g_debug ("test-fullmode: Set properties, next running mainloop until first check is received...");
...@@ -643,11 +542,8 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -643,11 +542,8 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
} }
/* step: pass remove candidates to agent L (offering party) */ /* step: pass remove candidates to agent L (offering party) */
cands = priv_get_local_candidate (ragent, rs_id, NICE_COMPONENT_TYPE_RTP); set_candidates (ragent, rs_id, lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTP, cands); set_candidates (ragent, rs_id, lagent, ls_id, NICE_COMPONENT_TYPE_RTCP);
cands = priv_get_local_candidate (ragent, rs_id, NICE_COMPONENT_TYPE_RTCP);
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTCP, cands);
g_debug ("test-fullmode: Running mainloop until connectivity checks succeeed."); g_debug ("test-fullmode: Running mainloop until connectivity checks succeeed.");
...@@ -683,20 +579,13 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -683,20 +579,13 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
nice_agent_remove_stream (lagent, ls_id); nice_agent_remove_stream (lagent, ls_id);
nice_agent_remove_stream (ragent, rs_id); nice_agent_remove_stream (ragent, rs_id);
g_slist_free (cands);
return 0; return 0;
} }
static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr) static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr)
{ {
NiceAddress laddr, raddr;
NiceCandidate cdes;
GSList *cands, *i;
guint ls_id, rs_id; guint ls_id, rs_id;
init_candidate (&cdes);
/* XXX: dear compiler, this is for you */ /* XXX: dear compiler, this is for you */
(void)baseaddr; (void)baseaddr;
...@@ -721,6 +610,7 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -721,6 +610,7 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N
rs_id = nice_agent_add_stream (ragent, 1); rs_id = nice_agent_add_stream (ragent, 1);
g_assert (ls_id > 0); g_assert (ls_id > 0);
g_assert (rs_id > 0); g_assert (rs_id > 0);
#if USE_TURN #if USE_TURN
nice_agent_set_relay_info(lagent, ls_id, 1, nice_agent_set_relay_info(lagent, ls_id, 1,
TURN_IP, TURN_PORT, TURN_USER, TURN_PASS, TURN_TYPE); TURN_IP, TURN_PORT, TURN_USER, TURN_PASS, TURN_TYPE);
...@@ -739,7 +629,7 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -739,7 +629,7 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N
g_main_loop_get_context (global_mainloop), cb_nice_recv, g_main_loop_get_context (global_mainloop), cb_nice_recv,
GUINT_TO_POINTER (2)); GUINT_TO_POINTER (2));
/* step: run mainloop until local candidates are ready /* step: run mainloop until local candidates are ready
* (see timer_cb() above) */ * (see timer_cb() above) */
if (global_lagent_gathering_done != TRUE || if (global_lagent_gathering_done != TRUE ||
global_ragent_gathering_done != TRUE) { global_ragent_gathering_done != TRUE) {
...@@ -749,37 +639,13 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -749,37 +639,13 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N
g_assert (global_ragent_gathering_done == TRUE); g_assert (global_ragent_gathering_done == TRUE);
} }
/* step: find out the local candidates of each agent */
cands = nice_agent_get_local_candidates(lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
for (i = cands; i; i = i->next) {
NiceCandidate *cand = i->data;
if (cand) {
g_debug ("test-fullmode: local port L %u",
nice_address_get_port (&cand->addr));
laddr = cand->addr;
}
}
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
cands = nice_agent_get_local_candidates(ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
for (i = cands; i; i = i->next) {
NiceCandidate *cand = i->data;
if (cand) {
g_debug ("test-fullmode: local port R %u",
nice_address_get_port (&cand->addr));
raddr = cand->addr;
}
}
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
g_debug ("test-fullmode: Got local candidates..."); g_debug ("test-fullmode: Got local candidates...");
nice_agent_set_remote_credentials (ragent, rs_id, "wrong", "password");
nice_agent_set_remote_credentials (lagent, ls_id, "wrong2", "password2");
/* step: pass the remote candidates to agents */ /* step: pass the remote candidates to agents */
cands = g_slist_append (NULL, &cdes);
{ {
gchar *ufrag = NULL, *password = NULL; gchar *ufrag = NULL, *password = NULL;
nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password); nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password);
...@@ -793,15 +659,12 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -793,15 +659,12 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N
g_free (ufrag); g_free (ufrag);
g_free (password); g_free (password);
} }
cdes.addr = raddr; set_candidates (ragent, rs_id, lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTP, cands); set_candidates (lagent, ls_id, ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
cdes.addr = laddr;
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTP, cands);
g_slist_free (cands);
g_debug ("test-fullmode: Set properties, next running mainloop until connectivity checks succeed..."); g_debug ("test-fullmode: Set properties, next running mainloop until connectivity checks succeed...");
/* step: run the mainloop until connectivity checks succeed /* step: run the mainloop until connectivity checks succeed
* (see timer_cb() above) */ * (see timer_cb() above) */
g_main_loop_run (global_mainloop); g_main_loop_run (global_mainloop);
...@@ -821,13 +684,8 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N ...@@ -821,13 +684,8 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N
static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr, gboolean role) static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *baseaddr, gboolean role)
{ {
NiceAddress laddr, raddr;
NiceCandidate cdes;
GSList *cands, *i;
guint ls_id, rs_id; guint ls_id, rs_id;
init_candidate (&cdes);
/* XXX: dear compiler, this is for you */ /* XXX: dear compiler, this is for you */
(void)baseaddr; (void)baseaddr;
...@@ -851,6 +709,7 @@ static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent, ...@@ -851,6 +709,7 @@ static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent,
rs_id = nice_agent_add_stream (ragent, 1); rs_id = nice_agent_add_stream (ragent, 1);
g_assert (ls_id > 0); g_assert (ls_id > 0);
g_assert (rs_id > 0); g_assert (rs_id > 0);
#if USE_TURN #if USE_TURN
nice_agent_set_relay_info(lagent, ls_id, 1, nice_agent_set_relay_info(lagent, ls_id, 1,
TURN_IP, TURN_PORT, TURN_USER, TURN_PASS, TURN_TYPE); TURN_IP, TURN_PORT, TURN_USER, TURN_PASS, TURN_TYPE);
...@@ -879,36 +738,9 @@ static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent, ...@@ -879,36 +738,9 @@ static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent,
g_assert (global_ragent_gathering_done == TRUE); g_assert (global_ragent_gathering_done == TRUE);
} }
/* step: find out the local candidates of each agent */
cands = nice_agent_get_local_candidates(lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
for (i = cands; i; i = i->next) {
NiceCandidate *cand = i->data;
if (cand) {
g_debug ("test-fullmode: local port L %u",
nice_address_get_port (&cand->addr));
laddr = cand->addr;
}
}
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
cands = nice_agent_get_local_candidates(ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
for (i = cands; i; i = i->next) {
NiceCandidate *cand = i->data;
if (cand) {
g_debug ("test-fullmode: local port R %u",
nice_address_get_port (&cand->addr));
raddr = cand->addr;
}
}
for (i = cands; i; i = i->next)
nice_candidate_free ((NiceCandidate *) i->data);
g_slist_free (cands);
g_debug ("test-fullmode: Got local candidates..."); g_debug ("test-fullmode: Got local candidates...");
/* step: pass the remote candidates to agents */ /* step: pass the remote candidates to agents */
cands = g_slist_append (NULL, &cdes);
{ {
gchar *ufrag = NULL, *password = NULL; gchar *ufrag = NULL, *password = NULL;
nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password); nice_agent_get_local_credentials(lagent, ls_id, &ufrag, &password);
...@@ -922,15 +754,12 @@ static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent, ...@@ -922,15 +754,12 @@ static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent,
g_free (ufrag); g_free (ufrag);
g_free (password); g_free (password);
} }
cdes.addr = raddr; set_candidates (ragent, rs_id, lagent, ls_id, NICE_COMPONENT_TYPE_RTP);
nice_agent_set_remote_candidates (lagent, ls_id, NICE_COMPONENT_TYPE_RTP, cands); set_candidates (lagent, ls_id, ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
cdes.addr = laddr;
nice_agent_set_remote_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTP, cands);
g_slist_free (cands);
g_debug ("test-fullmode: Set properties, next running mainloop until connectivity checks succeed..."); g_debug ("test-fullmode: Set properties, next running mainloop until connectivity checks succeed...");
/* step: run the mainloop until connectivity checks succeed /* step: run the mainloop until connectivity checks succeed
* (see timer_cb() above) */ * (see timer_cb() above) */
g_main_loop_run (global_mainloop); g_main_loop_run (global_mainloop);
......
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