Ignore:
Timestamp:
Aug 6, 2006 11:07:25 PM (18 years ago)
Author:
bennylp
Message:

Fixed assertion error if ACK is received before INVITE transaction sends final response (malicious?). Also fixed misc warnings, and stress-tested on Quad Xeon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r651 r657  
    140140    puts  ("  --auto-answer=code  Automatically answer incoming calls with code (e.g. 200)"); 
    141141    puts  ("  --max-calls=N       Maximum number of concurrent calls (default:4, max:255)"); 
     142    puts  ("  --thread-cnt=N      Number of worker threads (default:1)"); 
    142143    /* 
    143144    puts  ("  --duration=SEC      Set maximum call duration (default:no limit)"); 
     
    265266           OPT_RX_DROP_PCT, OPT_TX_DROP_PCT, OPT_EC_TAIL, 
    266267           OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS,  
    267            OPT_DURATION, OPT_NO_TCP, OPT_NO_UDP, 
     268           OPT_DURATION, OPT_NO_TCP, OPT_NO_UDP, OPT_THREAD_CNT, 
    268269    }; 
    269270    struct pj_getopt_option long_options[] = { 
     
    312313        { "next-cred",  0, 0, OPT_NEXT_CRED}, 
    313314        { "max-calls",  1, 0, OPT_MAX_CALLS}, 
    314         { "duration",1,0, OPT_DURATION}, 
     315        { "duration",   1, 0, OPT_DURATION}, 
     316        { "thread-cnt", 1, 0, OPT_THREAD_CNT}, 
    315317        { NULL, 0, 0, 0} 
    316318    }; 
     
    612614            break; 
    613615        */ 
     616 
     617        case OPT_THREAD_CNT: 
     618            cfg->cfg.thread_cnt = my_atoi(pj_optarg); 
     619            if (cfg->cfg.thread_cnt > 128) { 
     620                PJ_LOG(1,(THIS_FILE, 
     621                          "Error: invalid --thread-cnt option")); 
     622                return -1; 
     623            } 
     624            break; 
    614625 
    615626        case OPT_PTIME: 
Note: See TracChangeset for help on using the changeset viewer.