diff --git a/include/re_ice.h b/include/re_ice.h index 1968b5b4a..bdf702493 100644 --- a/include/re_ice.h +++ b/include/re_ice.h @@ -125,7 +125,7 @@ const char *ice_role2name(enum ice_role role); const char *ice_candpair_state2name(enum ice_candpair_state st); -uint32_t ice_cand_calc_prio(enum ice_cand_type type, uint16_t local, +uint32_t ice_cand_calc_prio(enum ice_cand_type type, uint16_t lpref, unsigned compid); diff --git a/src/ice/util.c b/src/ice/util.c index d6376fb28..141e757ff 100644 --- a/src/ice/util.c +++ b/src/ice/util.c @@ -49,10 +49,10 @@ static uint32_t type_prio(enum ice_cand_type type) } -uint32_t ice_cand_calc_prio(enum ice_cand_type type, uint16_t local, +uint32_t ice_cand_calc_prio(enum ice_cand_type type, uint16_t lpref, unsigned compid) { - return type_prio(type)<<24 | (uint32_t)local<<8 | (256 - compid); + return type_prio(type)<<24 | (uint32_t)lpref<<8 | (256 - compid); }