Changeset 5170 for pjproject/trunk/pjnath/src/pjnath/ice_session.c
- Timestamp:
- Aug 25, 2015 8:45:46 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_session.c
r5070 r5170 1601 1601 const pj_str_t *rem_ufrag, 1602 1602 const pj_str_t *rem_passwd, 1603 unsigned r cand_cnt,1604 const pj_ice_sess_cand r cand[])1603 unsigned rem_cand_cnt, 1604 const pj_ice_sess_cand rem_cand[]) 1605 1605 { 1606 1606 pj_ice_sess_checklist *clist; … … 1612 1612 pj_status_t status; 1613 1613 1614 PJ_ASSERT_RETURN(ice && rem_ufrag && rem_passwd && r cand_cnt && rcand,1615 PJ_EINVAL);1616 PJ_ASSERT_RETURN(r cand_cnt + ice->rcand_cnt <= PJ_ICE_MAX_CAND,1614 PJ_ASSERT_RETURN(ice && rem_ufrag && rem_passwd && rem_cand_cnt && 1615 rem_cand, PJ_EINVAL); 1616 PJ_ASSERT_RETURN(rem_cand_cnt + ice->rcand_cnt <= PJ_ICE_MAX_CAND, 1617 1617 PJ_ETOOMANY); 1618 1618 … … 1639 1639 /* Save remote candidates */ 1640 1640 ice->rcand_cnt = 0; 1641 for (i=0; i<r cand_cnt; ++i) {1641 for (i=0; i<rem_cand_cnt; ++i) { 1642 1642 pj_ice_sess_cand *cn = &ice->rcand[ice->rcand_cnt]; 1643 1643 1644 1644 /* Ignore candidate which has no matching component ID */ 1645 if (r cand[i].comp_id==0 || rcand[i].comp_id > ice->comp_cnt) {1645 if (rem_cand[i].comp_id==0 || rem_cand[i].comp_id > ice->comp_cnt) { 1646 1646 continue; 1647 1647 } 1648 1648 1649 if (r cand[i].comp_id > highest_comp)1650 highest_comp = r cand[i].comp_id;1651 1652 pj_memcpy(cn, &r cand[i], sizeof(pj_ice_sess_cand));1653 pj_strdup(ice->pool, &cn->foundation, &r cand[i].foundation);1649 if (rem_cand[i].comp_id > highest_comp) 1650 highest_comp = rem_cand[i].comp_id; 1651 1652 pj_memcpy(cn, &rem_cand[i], sizeof(pj_ice_sess_cand)); 1653 pj_strdup(ice->pool, &cn->foundation, &rem_cand[i].foundation); 1654 1654 ice->rcand_cnt++; 1655 1655 }
Note: See TracChangeset
for help on using the changeset viewer.