- Timestamp:
- Jan 2, 2008 8:27:03 AM (17 years ago)
- Location:
- pjproject/trunk/pjsip/src/pjsua-lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r1622 r1655 865 865 pjsua_acc *acc; 866 866 pj_str_t contact; 867 char contact_buf[1024];868 867 pj_pool_t *pool; 869 868 pj_status_t status; … … 894 893 } 895 894 896 pool = pj _pool_create_on_buf(NULL, contact_buf, sizeof(contact_buf));895 pool = pjsua_pool_create("tmpregc", 512, 512); 897 896 status = pjsua_acc_create_uac_contact( pool, &contact, 898 897 acc_id, &acc->cfg.reg_uri); … … 902 901 status); 903 902 pjsip_regc_destroy(acc->regc); 903 pj_pool_release(pool); 904 904 acc->regc = NULL; 905 905 return status; … … 917 917 status); 918 918 pjsip_regc_destroy(acc->regc); 919 pj_pool_release(pool); 919 920 acc->regc = NULL; 920 921 return status; … … 953 954 pjsip_generic_string_hdr *h; 954 955 955 pool = pj_pool_create_on_buf(NULL, contact_buf, sizeof(contact_buf));956 956 pj_list_init(&hdr_list); 957 957 … … 962 962 pjsip_regc_add_headers(acc->regc, &hdr_list); 963 963 } 964 965 pj_pool_release(pool); 964 966 965 967 return PJ_SUCCESS; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r1615 r1655 1501 1501 pjsua_call *dest_call; 1502 1502 pjsip_dialog *dest_dlg; 1503 char str_dest_buf[ 512];1503 char str_dest_buf[PJSIP_MAX_URL_SIZE*2]; 1504 1504 pj_str_t str_dest; 1505 1505 int len; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r1639 r1655 221 221 pj_sockaddr_in mapped_addr[2]; 222 222 pj_status_t status = PJ_SUCCESS; 223 char addr_buf[ 80];223 char addr_buf[PJ_INET6_ADDRSTRLEN+2]; 224 224 pj_sock_t sock[2]; 225 225 … … 625 625 pjmedia_ice_cb ice_cb; 626 626 int next_port; 627 char name[32]; 627 628 #if PJMEDIA_ADVERTISE_RTCP 628 629 enum { COMP_CNT=2 }; … … 634 635 ice_cb.on_ice_complete = &on_ice_complete; 635 636 636 status = pjmedia_ice_create(pjsua_var.med_endpt, NULL, COMP_CNT, 637 pj_ansi_snprintf(name, sizeof(name), "icetp%02d", i); 638 639 status = pjmedia_ice_create(pjsua_var.med_endpt, name, COMP_CNT, 637 640 &pjsua_var.stun_cfg, &ice_cb, 638 641 &pjsua_var.calls[i].med_tp); … … 891 894 pjmedia_stream_info *si = NULL; 892 895 pjmedia_port *media_port; 893 pj_str_t port_name;894 char tmp[PJSIP_MAX_URL_SIZE];895 896 pj_status_t status; 896 897 … … 953 954 954 955 } else { 955 956 956 /* Start ICE */ 957 957 if (pjsua_var.media_cfg.enable_ice) { … … 1013 1013 * Add the call to conference bridge. 1014 1014 */ 1015 port_name.ptr = tmp; 1016 port_name.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, 1017 call->inv->dlg->remote.info->uri, 1018 tmp, sizeof(tmp)); 1019 if (port_name.slen < 1) { 1020 port_name = pj_str("call"); 1021 } 1022 status = pjmedia_conf_add_port( pjsua_var.mconf, call->inv->pool, 1023 media_port, 1024 &port_name, 1025 (unsigned*)&call->conf_slot); 1026 if (status != PJ_SUCCESS) { 1027 return status; 1015 { 1016 char tmp[PJSIP_MAX_URL_SIZE]; 1017 pj_str_t port_name; 1018 1019 port_name.ptr = tmp; 1020 port_name.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, 1021 call->inv->dlg->remote.info->uri, 1022 tmp, sizeof(tmp)); 1023 if (port_name.slen < 1) { 1024 port_name = pj_str("call"); 1025 } 1026 status = pjmedia_conf_add_port( pjsua_var.mconf, call->inv->pool, 1027 media_port, 1028 &port_name, 1029 (unsigned*)&call->conf_slot); 1030 if (status != PJ_SUCCESS) { 1031 return status; 1032 } 1028 1033 } 1029 1034 … … 1090 1095 PJ_DEF(unsigned) pjsua_conf_get_active_ports(void) 1091 1096 { 1092 unsigned ports[ 256];1097 unsigned ports[PJSUA_MAX_CONF_PORTS]; 1093 1098 unsigned count = PJ_ARRAY_SIZE(ports); 1094 1099 pj_status_t status;
Note: See TracChangeset
for help on using the changeset viewer.