- Timestamp:
- Apr 15, 2009 1:36:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r2484 r2599 901 901 return status; 902 902 903 /* If we have TURN candidate, now is the time to create the permissions */ 904 if (ice_st->comp[0]->turn_sock) { 905 unsigned i; 906 907 for (i=0; i<ice_st->comp_cnt; ++i) { 908 pj_ice_strans_comp *comp = ice_st->comp[i]; 909 pj_sockaddr addrs[PJ_ICE_ST_MAX_CAND]; 910 unsigned j, count=0; 911 912 /* Gather remote addresses for this component */ 913 for (j=0; j<rem_cand_cnt && count<PJ_ARRAY_SIZE(addrs); ++j) { 914 if (rem_cand[j].comp_id==i+1) { 915 pj_memcpy(&addrs[count++], &rem_cand[j].addr, 916 pj_sockaddr_get_len(&rem_cand[j].addr)); 917 } 918 } 919 920 if (count) { 921 status = pj_turn_sock_set_perm(comp->turn_sock, count, 922 addrs, 0); 923 if (status != PJ_SUCCESS) { 924 pj_ice_strans_stop_ice(ice_st); 925 return status; 926 } 927 } 928 } 929 } 930 903 931 /* Start ICE negotiation! */ 904 932 status = pj_ice_sess_start_check(ice_st->ice); 905 933 if (status != PJ_SUCCESS) { 906 934 pj_ice_strans_stop_ice(ice_st); 935 return status; 907 936 } 908 937 … … 1061 1090 1062 1091 if (check->lcand->transport_id == TP_TURN) { 1092 /* Activate channel binding for the remote address 1093 * for more efficient data transfer using TURN. 1094 */ 1095 status = pj_turn_sock_bind_channel( 1096 ice_st->comp[i]->turn_sock, 1097 &check->rcand->addr, 1098 sizeof(check->rcand->addr)); 1099 1063 1100 /* Disable logging for Send/Data indications */ 1064 1101 PJ_LOG(5,(ice_st->obj_name,
Note: See TracChangeset
for help on using the changeset viewer.