Changeset 1207
- Timestamp:
- Apr 19, 2007 11:03:23 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r1154 r1207 213 213 { 214 214 pj_ice_strans_cand *cand; 215 unsigned i; 215 216 216 217 PJ_ASSERT_RETURN(ice_st && comp && addr, PJ_EINVAL); 217 218 PJ_ASSERT_RETURN(comp->cand_cnt < PJ_ICE_ST_MAX_CAND, PJ_ETOOMANY); 219 220 /* Check that we don't have candidate with the same 221 * address. 222 */ 223 for (i=0; i<comp->cand_cnt; ++i) { 224 if (pj_memcmp(addr, &comp->cand_list[i].addr, 225 sizeof(pj_sockaddr_in))==0) 226 { 227 /* Duplicate */ 228 PJ_LOG(5,(ice_st->obj_name, "Duplicate candidate not added")); 229 return PJ_SUCCESS; 230 } 231 } 218 232 219 233 cand = &comp->cand_list[comp->cand_cnt]; … … 226 240 cand->local_pref = local_pref; 227 241 pj_ice_calc_foundation(ice_st->pool, &cand->foundation, type, 228 (const pj_sockaddr*)addr);242 &comp->local_addr); 229 243 230 244 if (set_default)
Note: See TracChangeset
for help on using the changeset viewer.