Changeset 305 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_settings.c
- Timestamp:
- Mar 6, 2006 4:25:59 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_settings.c
r300 r305 102 102 puts (" --auto-answer=code Automatically answer incoming calls with code (e.g. 200)"); 103 103 puts (" --max-calls=N Maximum number of concurrent calls (default:4, max:255)"); 104 puts (" --uas-refresh=N Interval in UAS to send re-INVITE (default:-1)"); 105 puts (" --uas-duration=N Maximum duration of incoming call (default:-1)"); 104 106 puts (""); 105 107 fflush(stdout); … … 226 228 OPT_PLAY_FILE, OPT_WB, OPT_UWB, OPT_RTP_PORT, OPT_ADD_CODEC, 227 229 OPT_COMPLEXITY, OPT_QUALITY, 228 OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS, 230 OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS, OPT_UAS_REFRESH, 231 OPT_UAS_DURATION, 229 232 }; 230 233 struct pj_getopt_option long_options[] = { … … 266 269 { "next-cred", 0, 0, OPT_NEXT_CRED}, 267 270 { "max-calls", 1, 0, OPT_MAX_CALLS}, 271 { "uas-refresh",1, 0, OPT_UAS_REFRESH}, 272 { "uas-duration",1,0, OPT_UAS_DURATION}, 268 273 { NULL, 0, 0, 0} 269 274 }; … … 534 539 if (pjsua.max_calls < 1 || pjsua.max_calls > 255) { 535 540 PJ_LOG(1,(THIS_FILE,"Too many calls for max-calls (1-255)")); 541 return -1; 542 } 543 break; 544 545 case OPT_UAS_REFRESH: 546 pjsua.uas_refresh = my_atoi(pj_optarg); 547 if (pjsua.uas_refresh < 1) { 548 PJ_LOG(1,(THIS_FILE,"Invalid value for --uas-refresh (must be >0)")); 549 return -1; 550 } 551 break; 552 553 case OPT_UAS_DURATION: 554 pjsua.uas_duration = my_atoi(pj_optarg); 555 if (pjsua.uas_duration < 1) { 556 PJ_LOG(1,(THIS_FILE,"Invalid value for --uas-duration (must be >0)")); 536 557 return -1; 537 558 } … … 916 937 pj_strcat2(&cfg, line); 917 938 939 /* Uas-refresh. */ 940 if (pjsua.uas_refresh > 0) { 941 pj_ansi_sprintf(line, "--uas-refresh %d\n", 942 pjsua.uas_refresh); 943 pj_strcat2(&cfg, line); 944 } 945 946 /* Uas-duration. */ 947 if (pjsua.uas_duration > 0) { 948 pj_ansi_sprintf(line, "--uas-duration %d\n", 949 pjsua.uas_duration); 950 pj_strcat2(&cfg, line); 951 } 918 952 919 953 pj_strcat2(&cfg, "#\n# Buddies:\n#\n");
Note: See TracChangeset
for help on using the changeset viewer.