Changeset 5342
- Timestamp:
- Jun 13, 2016 7:11:41 AM (8 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r5340 r5342 675 675 for (i=0; i<ice_st->cfg.stun_tp_cnt; ++i) { 676 676 status = add_stun_and_host(ice_st, comp, i); 677 if (status != PJ_SUCCESS) 678 return status; 677 if (status != PJ_SUCCESS) { 678 PJ_PERROR(3,(ice_st->obj_name, status, 679 "Failed creating STUN transport #%d for comp %d", 680 i, comp->comp_id)); 681 //return status; 682 } 679 683 } 680 684 … … 682 686 for (i=0; i<ice_st->cfg.turn_tp_cnt; ++i) { 683 687 status = add_update_turn(ice_st, comp, i); 684 if (status != PJ_SUCCESS) 685 return status; 688 if (status != PJ_SUCCESS) { 689 PJ_PERROR(3,(ice_st->obj_name, status, 690 "Failed creating TURN transport #%d for comp %d", 691 i, comp->comp_id)); 692 //return status; 693 } 686 694 } 687 695 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5339 r5342 824 824 unsigned comp_cnt; 825 825 pj_status_t status; 826 pj_bool_t use_ipv6; 826 827 827 828 acc_cfg = &pjsua_var.acc[call_med->call->acc_id].cfg; 829 use_ipv6 = (acc_cfg->ipv6_media_use != PJSUA_IPV6_DISABLED); 828 830 829 831 /* Make sure STUN server resolution has completed */ … … 856 858 ice_cfg.stun_tp_cnt = 1; 857 859 pj_ice_strans_stun_cfg_default(&ice_cfg.stun_tp[0]); 860 if (use_ipv6 && PJ_ICE_MAX_STUN >= 2) { 861 ice_cfg.stun_tp_cnt = 2; 862 pj_ice_strans_stun_cfg_default(&ice_cfg.stun_tp[1]); 863 ice_cfg.stun_tp[1].af = pj_AF_INET6(); 864 } 858 865 } 859 866 … … 866 873 ice_cfg.stun_tp[0].port = pj_sockaddr_get_port(&pjsua_var.stun_srv); 867 874 } 868 if (acc_cfg->ice_cfg.ice_max_host_cands >= 0) 869 ice_cfg.stun_tp[0].max_host_cands = acc_cfg->ice_cfg.ice_max_host_cands; 875 if (acc_cfg->ice_cfg.ice_max_host_cands >= 0) { 876 ice_cfg.stun_tp[0].max_host_cands = 877 acc_cfg->ice_cfg.ice_max_host_cands; 878 if (use_ipv6) 879 ice_cfg.stun_tp[1].max_host_cands = 880 acc_cfg->ice_cfg.ice_max_host_cands; 881 } 870 882 871 883 /* Copy binding port setting to STUN setting */ … … 873 885 &cfg->bound_addr, (pj_uint16_t)cfg->port); 874 886 ice_cfg.stun_tp[0].cfg.port_range = (pj_uint16_t)cfg->port_range; 875 if (cfg->port != 0 && ice_cfg.stun_tp[0].cfg.port_range == 0) 887 if (cfg->port != 0 && ice_cfg.stun_tp[0].cfg.port_range == 0) { 876 888 ice_cfg.stun_tp[0].cfg.port_range = 877 889 (pj_uint16_t)(pjsua_var.ua_cfg.max_calls * 10); 890 } 891 if (use_ipv6) { 892 pj_str_t IN6_ADDR_ANY = {"0", 1}; 893 pj_sockaddr_init(pj_AF_INET6(), &ice_cfg.stun_tp[1].cfg.bound_addr, 894 &IN6_ADDR_ANY, (pj_uint16_t)cfg->port); 895 ice_cfg.stun_tp[1].cfg.port_range = ice_cfg.stun_tp[0].cfg.port_range; 896 } 878 897 879 898 /* Copy QoS setting to STUN setting */ … … 881 900 pj_memcpy(&ice_cfg.stun_tp[0].cfg.qos_params, &cfg->qos_params, 882 901 sizeof(cfg->qos_params)); 902 if (use_ipv6) { 903 ice_cfg.stun_tp[1].cfg.qos_type = cfg->qos_type; 904 pj_memcpy(&ice_cfg.stun_tp[1].cfg.qos_params, &cfg->qos_params, 905 sizeof(cfg->qos_params)); 906 } 883 907 884 908 /* Configure TURN settings */ … … 917 941 ice_cfg.stun_tp[0].cfg.max_pkt_size = PJMEDIA_MAX_MRU; 918 942 ice_cfg.turn_tp[0].cfg.max_pkt_size = PJMEDIA_MAX_MRU; 943 944 if (use_ipv6) { 945 ice_cfg.stun_tp[1].cfg.max_pkt_size = PJMEDIA_MAX_MRU; 946 } 919 947 920 948 pj_bzero(&ice_cb, sizeof(pjmedia_ice_cb));
Note: See TracChangeset
for help on using the changeset viewer.