summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2009-06-02 19:57:01 -0400
committerYouness Alaoui <youness.alaoui@collabora.co.uk>2009-06-02 19:57:01 -0400
commiteec21ab7f11a313fae243f5975ef01aa66810d16 (patch)
treed41bf6889f7c71ba8ca83c743072bb036acfef40
parent6ff32569a6420a5c7df3d33529ddde84e9dabee2 (diff)
downloadlibnice-eec21ab7f11a313fae243f5975ef01aa66810d16.tar.gz
properly set remote candidates for delayed answer test, also include the delayed answer test in the google mode testing
-rw-r--r--agent/conncheck.c3
-rw-r--r--tests/test-fullmode.c23
2 files changed, 15 insertions, 11 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 5ccc711..ca84648 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -2626,7 +2626,8 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
}
}
- if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE &&
+ if (component->remote_candidates &&
+ agent->compatibility == NICE_COMPATIBILITY_GOOGLE &&
local_candidate == NULL &&
discovery_msg == FALSE) {
/* if we couldn't match the username and the stun agent has
diff --git a/tests/test-fullmode.c b/tests/test-fullmode.c
index 2d1e7ba..6d31870 100644
--- a/tests/test-fullmode.c
+++ b/tests/test-fullmode.c
@@ -576,12 +576,16 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
g_free (password);
}
/* step: set remote candidates for agent R (answering party) */
+ /*
cands = g_slist_append (NULL, &cdes);
cdes.component_id = NICE_COMPONENT_TYPE_RTP;
- cdes.addr = laddr;
+ 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;
+
+ /*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...");
@@ -611,11 +615,10 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
}
/* step: pass remove candidates to agent L (offering party) */
- cdes.component_id = NICE_COMPONENT_TYPE_RTP;
- cdes.addr = raddr;
+ 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);
- cdes.component_id = NICE_COMPONENT_TYPE_RTCP;
- cdes.addr = raddr_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.");
@@ -1031,9 +1034,6 @@ int main (void)
g_assert (global_lagent_cands == 2);
g_assert (global_ragent_cands == 2);
-#if TEST_GOOGLE
- return result;
-#endif
/* step: run test simulating delayed SDP answer */
g_debug ("test-fullmode: TEST STARTS / delayed SDP answer");
@@ -1048,6 +1048,9 @@ int main (void)
g_assert (global_lagent_cands == 2);
g_assert (global_ragent_cands == 2);
+#if TEST_GOOGLE
+ return result;
+#endif
/* run test with incorrect credentials (make sure process fails) */
g_debug ("test-fullmode: TEST STARTS / incorrect credentials");