Changeset 1093 for pjproject/trunk/pjnath/src/pjnath/ice.c
- Timestamp:
- Mar 21, 2007 10:05:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice.c
r1092 r1093 137 137 pj_ice_role role, 138 138 const pj_ice_cb *cb, 139 int af,140 int sock_type,141 139 pj_ice **p_ice) 142 140 { … … 147 145 148 146 PJ_ASSERT_RETURN(stun_cfg && cb && p_ice, PJ_EINVAL); 149 PJ_ASSERT_RETURN(sock_type==PJ_SOCK_DGRAM || sock_type==PJ_SOCK_STREAM,150 PJ_EINVAL);151 147 152 148 if (!name) … … 156 152 ice = PJ_POOL_ZALLOC_T(pool, pj_ice); 157 153 ice->pool = pool; 158 ice->af = af;159 ice->sock_type = sock_type;160 154 ice->role = role; 161 155 … … 436 430 437 431 pj_strdup(ice->pool, &ice->tx_uname, &username); 432 pj_strdup(ice->pool, &ice->tx_ufrag, remote_ufrag); 438 433 pj_strdup(ice->pool, &ice->tx_pass, remote_pass); 439 434 … … 443 438 444 439 pj_strdup(ice->pool, &ice->rx_uname, &username); 440 pj_strdup(ice->pool, &ice->rx_ufrag, local_ufrag); 445 441 pj_strdup(ice->pool, &ice->rx_pass, local_pass); 446 442 … … 482 478 char tmp[128]; 483 479 484 PJ_ASSERT_RETURN(ice && comp_id && type &&local_pref &&480 PJ_ASSERT_RETURN(ice && comp_id && local_pref && 485 481 foundation && addr && base_addr && addr_len, 486 482 PJ_EINVAL); … … 704 700 for (i=0; i<clist->count; ++i) { 705 701 const pj_ice_check *c = &clist->checks[i]; 706 LOG((ice->obj_name, " %d: %s (prio= %u, state=%s)",702 LOG((ice->obj_name, " %d: %s (prio=0x%"PJ_INT64_FMT"x, state=%s)", 707 703 i, dump_check(buffer, sizeof(buffer), c), 708 704 c->prio, check_state_name[c->state])); … … 1102 1098 lcand = check->lcand; 1103 1099 rcand = check->rcand; 1104 comp = &ice->comp[lcand->comp_id];1100 comp = find_comp(ice, lcand->comp_id); 1105 1101 1106 1102 LOG((ice->obj_name, … … 1734 1730 pj_status_t status = PJ_SUCCESS; 1735 1731 pj_ice_comp *comp; 1736 pj_ bool_t is_stun;1732 pj_status_t stun_status; 1737 1733 1738 1734 PJ_ASSERT_RETURN(ice, PJ_EINVAL); … … 1746 1742 } 1747 1743 1748 is_stun= pj_stun_msg_check(pkt, pkt_size, PJ_STUN_IS_DATAGRAM);1749 if ( is_stun) {1744 stun_status = pj_stun_msg_check(pkt, pkt_size, PJ_STUN_IS_DATAGRAM); 1745 if (stun_status == PJ_SUCCESS) { 1750 1746 status = pj_stun_session_on_rx_pkt(comp->stun_sess, pkt, pkt_size, 1751 1747 PJ_STUN_IS_DATAGRAM,
Note: See TracChangeset
for help on using the changeset viewer.