break;
}
- if (reliable && candidate->transport == NICE_CANDIDATE_TRANSPORT_UDP) {
- type_preference = NICE_CANDIDATE_TYPE_PREF_UDP_TUNNELED;
- } else if (!reliable && candidate->transport != NICE_CANDIDATE_TRANSPORT_UDP) {
- type_preference = type_preference / 2 - 1;
+ if ((reliable && candidate->transport == NICE_CANDIDATE_TRANSPORT_UDP) ||
+ (!reliable && candidate->transport != NICE_CANDIDATE_TRANSPORT_UDP)) {
+ type_preference = type_preference / 2;
}
local_preference = nice_candidate_ice_local_priority (candidate);
#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 60
+#define NICE_CANDIDATE_TYPE_PREF_RELAYED 10
/* Max foundation size '1*32ice-char' plus terminating NULL, ICE ID-19 */
/**
candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP;
candidate->component_id = 1;
g_assert (nice_candidate_ice_priority (candidate, FALSE, FALSE) == 0x780001FF);
- /* Host UDP-tunneled reliable */
- g_assert (nice_candidate_ice_priority (candidate, TRUE, FALSE) == 0x4B0001FF);
+ /* Host UDP reliable */
+ g_assert (nice_candidate_ice_priority (candidate, TRUE, FALSE) == 0x3C0001FF);
/* Host tcp-active unreliable */
candidate->transport = NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE;
- g_assert (nice_candidate_ice_priority (candidate, FALSE, FALSE) == 0x3BC001FF);
+ g_assert (nice_candidate_ice_priority (candidate, FALSE, FALSE) == 0x3CC001FF);
/* Host tcp-active reliable */
candidate->transport = NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE;
/* Host tcp-active reliable */