diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-08-06 23:07:25 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-08-06 23:07:25 +0000 |
commit | 7786b1e99d249798e0e394bf473b954b3a612072 (patch) | |
tree | 88638230f2edbad4d6329906b68657811d6cca6f /pjsip-apps/src/pjsua/pjsua_app.c | |
parent | 6dd0c041b65a7c102aad3aee3c35264e3bf1186f (diff) |
Fixed assertion error if ACK is received before INVITE transaction sends final response (malicious?). Also fixed misc warnings, and stress-tested on Quad Xeon
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@657 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/pjsua/pjsua_app.c')
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index b59365ac..f76aebdd 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -139,6 +139,7 @@ static void usage(void) puts ("User Agent options:"); puts (" --auto-answer=code Automatically answer incoming calls with code (e.g. 200)"); puts (" --max-calls=N Maximum number of concurrent calls (default:4, max:255)"); + puts (" --thread-cnt=N Number of worker threads (default:1)"); /* puts (" --duration=SEC Set maximum call duration (default:no limit)"); */ @@ -264,7 +265,7 @@ static pj_status_t parse_args(int argc, char *argv[], OPT_COMPLEXITY, OPT_QUALITY, OPT_PTIME, OPT_NO_VAD, OPT_RX_DROP_PCT, OPT_TX_DROP_PCT, OPT_EC_TAIL, OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS, - OPT_DURATION, OPT_NO_TCP, OPT_NO_UDP, + OPT_DURATION, OPT_NO_TCP, OPT_NO_UDP, OPT_THREAD_CNT, }; struct pj_getopt_option long_options[] = { { "config-file",1, 0, OPT_CONFIG_FILE}, @@ -311,7 +312,8 @@ static pj_status_t parse_args(int argc, char *argv[], { "next-account",0,0, OPT_NEXT_ACCOUNT}, { "next-cred", 0, 0, OPT_NEXT_CRED}, { "max-calls", 1, 0, OPT_MAX_CALLS}, - { "duration",1,0, OPT_DURATION}, + { "duration", 1, 0, OPT_DURATION}, + { "thread-cnt", 1, 0, OPT_THREAD_CNT}, { NULL, 0, 0, 0} }; pj_status_t status; @@ -612,6 +614,15 @@ static pj_status_t parse_args(int argc, char *argv[], break; */ + case OPT_THREAD_CNT: + cfg->cfg.thread_cnt = my_atoi(pj_optarg); + if (cfg->cfg.thread_cnt > 128) { + PJ_LOG(1,(THIS_FILE, + "Error: invalid --thread-cnt option")); + return -1; + } + break; + case OPT_PTIME: cfg->media_cfg.ptime = my_atoi(pj_optarg); if (cfg->media_cfg.ptime < 10 || cfg->media_cfg.ptime > 1000) { |