Changeset 5461
- Timestamp:
- Oct 14, 2016 4:53:07 AM (8 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/pjsua
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
r5170 r5461 1089 1089 }; 1090 1090 1091 choice = pj_strtol(&cval->argv[1]) - 1;1091 choice = (int)pj_strtol(&cval->argv[1]) - 1; 1092 1092 1093 1093 pj_bzero(&elem, sizeof(elem)); … … 1248 1248 1249 1249 if (connect) 1250 status = pjsua_conf_connect( pj_strtol(&cval->argv[1]),1251 pj_strtol(&cval->argv[2]));1250 status = pjsua_conf_connect((int)pj_strtol(&cval->argv[1]), 1251 (int)pj_strtol(&cval->argv[2])); 1252 1252 else 1253 status = pjsua_conf_disconnect( pj_strtol(&cval->argv[1]),1254 pj_strtol(&cval->argv[2]));1253 status = pjsua_conf_disconnect((int)pj_strtol(&cval->argv[1]), 1254 (int)pj_strtol(&cval->argv[2])); 1255 1255 1256 1256 if (status == PJ_SUCCESS) { … … 1306 1306 pj_status_t status; 1307 1307 1308 new_prio = pj_strtol(&cval->argv[2]);1308 new_prio = (int)pj_strtol(&cval->argv[2]); 1309 1309 if (new_prio < 0) 1310 1310 new_prio = 0; … … 1517 1517 pjsua_call_get_count()); 1518 1518 1519 count = pj_strtol(&cval->argv[1]);1519 count = (int)pj_strtol(&cval->argv[1]); 1520 1520 if (count < 1) 1521 1521 return PJ_SUCCESS; … … 1577 1577 pjsip_generic_string_hdr hcontact; 1578 1578 1579 st_code = pj_strtol(&cval->argv[1]);1579 st_code = (int)pj_strtol(&cval->argv[1]); 1580 1580 if ((st_code < 100) || (st_code > 699)) 1581 1581 return PJ_SUCCESS; … … 1850 1850 ACCEPT_REPLACE, ACCEPT, REJECT, STOP 1851 1851 }; 1852 int choice = pj_strtol(&cval->argv[1]);1852 int choice = (int)pj_strtol(&cval->argv[1]); 1853 1853 1854 1854 switch (choice) { … … 2550 2550 int delay; 2551 2551 2552 delay = pj_strtoul(&cval->argv[1]);2552 delay = (int)pj_strtoul(&cval->argv[1]); 2553 2553 if (delay < 0) delay = 0; 2554 2554 pj_thread_sleep(delay); -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_common.c
r5259 r5461 53 53 } else if (cs[0] == '+') { 54 54 s.ptr++, s.slen--; 55 return pj_strtoul(&s);55 return (int)pj_strtoul(&s); 56 56 } else { 57 return pj_strtoul(&s);57 return (int)pj_strtoul(&s); 58 58 } 59 59 } -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_config.c
r5186 r5461 560 560 561 561 case OPT_LOG_LEVEL: 562 c = pj_strtoul(pj_cstr(&tmp, pj_optarg));562 c = (int)pj_strtoul(pj_cstr(&tmp, pj_optarg)); 563 563 if (c < 0 || c > 6) { 564 564 PJ_LOG(1,(THIS_FILE, … … 572 572 573 573 case OPT_APP_LOG_LEVEL: 574 cfg->log_cfg.console_level = pj_strtoul(pj_cstr(&tmp, pj_optarg));574 cfg->log_cfg.console_level = (unsigned)pj_strtoul(pj_cstr(&tmp, pj_optarg)); 575 575 if (cfg->log_cfg.console_level > 6) { 576 576 PJ_LOG(1,(THIS_FILE, … … 627 627 return PJ_EINVAL; 628 628 } 629 cfg->media_cfg.clock_rate = lval;629 cfg->media_cfg.clock_rate = (unsigned)lval; 630 630 break; 631 631 … … 637 637 return PJ_EINVAL; 638 638 } 639 cfg->media_cfg.snd_clock_rate = lval;639 cfg->media_cfg.snd_clock_rate = (unsigned)lval; 640 640 break; 641 641 … … 718 718 719 719 case OPT_REG_TIMEOUT: /* reg-timeout */ 720 cur_acc->reg_timeout = pj_strtoul(pj_cstr(&tmp,pj_optarg));720 cur_acc->reg_timeout = (unsigned)pj_strtoul(pj_cstr(&tmp,pj_optarg)); 721 721 if (cur_acc->reg_timeout < 1 || cur_acc->reg_timeout > 3600) { 722 722 PJ_LOG(1,(THIS_FILE, … … 747 747 return PJ_EINVAL; 748 748 } 749 cur_acc->use_timer = lval;750 cfg->cfg.use_timer = lval;749 cur_acc->use_timer = (pjsua_sip_timer_use)lval; 750 cfg->cfg.use_timer = (pjsua_sip_timer_use)lval; 751 751 break; 752 752 753 753 case OPT_TIMER_SE: /** session timer session expiration */ 754 cur_acc->timer_setting.sess_expires = pj_strtoul(pj_cstr(&tmp, pj_optarg));754 cur_acc->timer_setting.sess_expires = (unsigned)pj_strtoul(pj_cstr(&tmp, pj_optarg)); 755 755 if (cur_acc->timer_setting.sess_expires < 90) { 756 756 PJ_LOG(1,(THIS_FILE, … … 763 763 764 764 case OPT_TIMER_MIN_SE: /** session timer minimum session expiration */ 765 cur_acc->timer_setting.min_se = pj_strtoul(pj_cstr(&tmp, pj_optarg));765 cur_acc->timer_setting.min_se = (unsigned)pj_strtoul(pj_cstr(&tmp, pj_optarg)); 766 766 if (cur_acc->timer_setting.min_se < 90) { 767 767 PJ_LOG(1,(THIS_FILE, … … 810 810 811 811 case OPT_AUTO_UPDATE_NAT: /* OPT_AUTO_UPDATE_NAT */ 812 cur_acc->allow_contact_rewrite = pj_strtoul(pj_cstr(&tmp, pj_optarg));812 cur_acc->allow_contact_rewrite = (pj_bool_t)pj_strtoul(pj_cstr(&tmp, pj_optarg)); 813 813 break; 814 814 … … 871 871 872 872 case OPT_REG_RETRY_INTERVAL: 873 cur_acc->reg_retry_interval = pj_strtoul(pj_cstr(&tmp, pj_optarg));873 cur_acc->reg_retry_interval = (unsigned)pj_strtoul(pj_cstr(&tmp, pj_optarg)); 874 874 break; 875 875 -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_legacy.c
r5265 r5461 1379 1379 } 1380 1380 1381 delay = pj_strtoul(&tmp);1381 delay = (int)pj_strtoul(&tmp); 1382 1382 if (delay < 0) delay = 0; 1383 1383 pj_thread_sleep(delay);
Note: See TracChangeset
for help on using the changeset viewer.