summaryrefslogtreecommitdiff
path: root/agent/candidate.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2016-03-01 15:27:46 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2016-05-26 16:08:57 -0400
commit1fb6401d9d5dbee8ba28a20f3d787a95f13d1883 (patch)
tree1997a17b40991efff33b27ae121f9b946a9d86fe /agent/candidate.c
parent8ee6d1bbed87fda37ade7b5c5d9483f41037b06a (diff)
downloadlibnice-1fb6401d9d5dbee8ba28a20f3d787a95f13d1883.tar.gz
candidate: Give lower priority to TCP relayed candidates
Diffstat (limited to 'agent/candidate.c')
-rw-r--r--agent/candidate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/agent/candidate.c b/agent/candidate.c
index 0277a79..68c7714 100644
--- a/agent/candidate.c
+++ b/agent/candidate.c
@@ -277,7 +277,10 @@ nice_candidate_ice_type_preference (const NiceCandidate *candidate,
type_preference = NICE_CANDIDATE_TYPE_PREF_SERVER_REFLEXIVE;
break;
case NICE_CANDIDATE_TYPE_RELAYED:
- type_preference = NICE_CANDIDATE_TYPE_PREF_RELAYED;
+ if (candidate->turn->type == NICE_RELAY_TYPE_TURN_UDP)
+ type_preference = NICE_CANDIDATE_TYPE_PREF_RELAYED_UDP;
+ else
+ type_preference = NICE_CANDIDATE_TYPE_PREF_RELAYED;
break;
default:
type_preference = 0;