Commit f379241c authored by Olivier Crête's avatar Olivier Crête

candidate: Give lower priority to TCP relayed candidates

parent 92fb2835
......@@ -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;
......
......@@ -64,8 +64,8 @@ G_BEGIN_DECLS
#define NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE 110
#define NICE_CANDIDATE_TYPE_PREF_NAT_ASSISTED 105
#define NICE_CANDIDATE_TYPE_PREF_SERVER_REFLEXIVE 100
#define NICE_CANDIDATE_TYPE_PREF_UDP_TUNNELED 75
#define NICE_CANDIDATE_TYPE_PREF_RELAYED 10
#define NICE_CANDIDATE_TYPE_PREF_RELAYED_UDP 30
#define NICE_CANDIDATE_TYPE_PREF_RELAYED 20
/* Priority preference constants for MS-ICE compatibility */
#define NICE_CANDIDATE_TRANSPORT_MS_PREF_UDP 15
......
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