Changeset 947 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Feb 14, 2007 2:36:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r904 r947 486 486 case OPT_LOCAL_PORT: /* local-port */ 487 487 lval = pj_strtoul(pj_cstr(&tmp, pj_optarg)); 488 if (lval < 1|| lval > 65535) {488 if (lval < 0 || lval > 65535) { 489 489 PJ_LOG(1,(THIS_FILE, 490 490 "Error: expecting integer value for " … … 2892 2892 { 2893 2893 pjsua_transport_id transport_id = -1; 2894 pjsua_transport_config tcp_cfg; 2894 2895 unsigned i; 2895 2896 pj_status_t status; … … 2996 2997 } 2997 2998 2999 pj_memcpy(&tcp_cfg, &app_config.udp_cfg, sizeof(tcp_cfg)); 3000 2998 3001 /* Add UDP transport unless it's disabled. */ 2999 3002 if (!app_config.no_udp) { … … 3010 3013 //pjsua_acc_set_transport(aid, transport_id); 3011 3014 pjsua_acc_set_online_status(current_acc, PJ_TRUE); 3015 3016 if (app_config.udp_cfg.port == 0) { 3017 pjsua_transport_info ti; 3018 pj_sockaddr_in *a; 3019 3020 pjsua_transport_get_info(transport_id, &ti); 3021 a = (pj_sockaddr_in*)&ti.local_addr; 3022 3023 tcp_cfg.port = pj_ntohs(a->sin_port); 3024 } 3012 3025 } 3013 3026 … … 3015 3028 if (!app_config.no_tcp) { 3016 3029 status = pjsua_transport_create(PJSIP_TRANSPORT_TCP, 3017 & app_config.udp_cfg,3030 &tcp_cfg, 3018 3031 &transport_id); 3019 3032 if (status != PJ_SUCCESS)
Note: See TracChangeset
for help on using the changeset viewer.