summaryrefslogtreecommitdiff
path: root/agent/discovery.c
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2014-04-09 19:47:54 -0400
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2014-05-15 09:44:00 -0400
commitf8ed0188d5c640ec9caf4ad4e744a5e301b5d813 (patch)
tree6a65e1d5686c386d6fe0bb933838482d4c763aa5 /agent/discovery.c
parent6263028ed29d87a44970f928914cb89dfa659604 (diff)
downloadlibnice-f8ed0188d5c640ec9caf4ad4e744a5e301b5d813.tar.gz
Add support for MS-ICE2 candidate priorization for OC2007R2 compatibility
Diffstat (limited to 'agent/discovery.c')
-rw-r--r--agent/discovery.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/agent/discovery.c b/agent/discovery.c
index b84a36b..e39c2f9 100644
--- a/agent/discovery.c
+++ b/agent/discovery.c
@@ -485,6 +485,9 @@ NiceCandidate *discovery_add_local_host_candidate (
} else if (agent->compatibility == NICE_COMPATIBILITY_MSN ||
agent->compatibility == NICE_COMPATIBILITY_OC2007) {
candidate->priority = nice_candidate_msn_priority (candidate);
+ } else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
+ candidate->priority = nice_candidate_ms_ice_priority (candidate,
+ agent->reliable, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);
@@ -557,6 +560,9 @@ discovery_add_server_reflexive_candidate (
} else if (agent->compatibility == NICE_COMPATIBILITY_MSN ||
agent->compatibility == NICE_COMPATIBILITY_OC2007) {
candidate->priority = nice_candidate_msn_priority (candidate);
+ } else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
+ candidate->priority = nice_candidate_ms_ice_priority (candidate,
+ agent->reliable, nat_assisted);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, nat_assisted);
@@ -618,6 +624,9 @@ discovery_add_relay_candidate (
} else if (agent->compatibility == NICE_COMPATIBILITY_MSN ||
agent->compatibility == NICE_COMPATIBILITY_OC2007) {
candidate->priority = nice_candidate_msn_priority (candidate);
+ } else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
+ candidate->priority = nice_candidate_ms_ice_priority (candidate,
+ agent->reliable, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);
@@ -695,6 +704,9 @@ discovery_add_peer_reflexive_candidate (
} else if (agent->compatibility == NICE_COMPATIBILITY_MSN ||
agent->compatibility == NICE_COMPATIBILITY_OC2007) {
candidate->priority = nice_candidate_msn_priority (candidate);
+ } else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
+ candidate->priority = nice_candidate_ms_ice_priority (candidate,
+ agent->reliable, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);
@@ -796,6 +808,9 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate (
} else if (agent->compatibility == NICE_COMPATIBILITY_MSN ||
agent->compatibility == NICE_COMPATIBILITY_OC2007) {
candidate->priority = nice_candidate_msn_priority (candidate);
+ } else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
+ candidate->priority = nice_candidate_ms_ice_priority (candidate,
+ agent->reliable, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);