Changeset 521


Ignore:
Timestamp:
Jun 19, 2006 12:07:44 PM (18 years ago)
Author:
bennylp
Message:

Comment out PJSUA options that are no longer supported with new pjsua

File:
1 edited

Legend:

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

    r510 r521  
    8989    puts  ("  --proxy=url         Optional URL of proxy server to visit"); 
    9090    puts  ("                      May be specified multiple times"); 
     91    puts  ("  --reg-timeout=SEC   Optional registration interval (default 55)"); 
    9192    puts  ("  --realm=string      Set realm"); 
    9293    puts  ("  --username=string   Set authentication username"); 
    9394    puts  ("  --password=string   Set authentication password"); 
    94     puts  ("  --reg-timeout=SEC   Optional registration interval (default 55)"); 
     95    puts  ("  --next-cred         Add another credentials"); 
    9596    puts  (""); 
    9697    puts  ("SIP Account Control:"); 
     
    112113    puts  ("  --auto-loop         Automatically loop incoming RTP to outgoing RTP"); 
    113114    puts  ("  --rtp-port=N        Base port to try for RTP (default=4000)"); 
     115    /* 
    114116    puts  ("  --complexity=N      Specify encoding complexity (0-10, default=none(-1))"); 
    115117    puts  ("  --quality=N         Specify encoding quality (0-10, default=4)"); 
    116118    puts  ("  --ptime=MSEC        Override codec ptime to MSEC (default=specific)"); 
     119    */ 
    117120    puts  (""); 
    118121    puts  ("Buddy List (can be more than one):"); 
     
    122125    puts  ("  --auto-answer=code  Automatically answer incoming calls with code (e.g. 200)"); 
    123126    puts  ("  --max-calls=N       Maximum number of concurrent calls (default:4, max:255)"); 
     127    /* 
    124128    puts  ("  --duration=SEC      Set maximum call duration (default:no limit)"); 
     129    */ 
    125130    puts  (""); 
    126131    fflush(stdout); 
     
    238243           OPT_PLAY_FILE, OPT_RTP_PORT, OPT_ADD_CODEC, 
    239244           OPT_COMPLEXITY, OPT_QUALITY, OPT_PTIME, 
    240            OPT_NEXT_ACCOUNT, OPT_MAX_CALLS,  
     245           OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS,  
    241246           OPT_DURATION, 
    242247    }; 
     
    277282        { "ptime",      1, 0, OPT_PTIME}, 
    278283        { "next-account",0,0, OPT_NEXT_ACCOUNT}, 
     284        { "next-cred",  0, 0, OPT_NEXT_CRED}, 
    279285        { "max-calls",  1, 0, OPT_MAX_CALLS}, 
    280286        { "duration",1,0, OPT_DURATION}, 
     
    449455 
    450456        case OPT_USERNAME:   /* Default authentication user */ 
    451             cur_acc->cred_count = 1; 
    452             cur_acc->cred_info[0].username = pj_str(pj_optarg); 
     457            cur_acc->cred_info[cur_acc->cred_count].username = pj_str(pj_optarg); 
     458            cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str("digest"); 
    453459            break; 
    454460 
    455461        case OPT_REALM:     /* Default authentication realm. */ 
    456             cur_acc->cred_count = 1; 
    457             cur_acc->cred_info[0].realm = pj_str(pj_optarg); 
     462            cur_acc->cred_info[cur_acc->cred_count].realm = pj_str(pj_optarg); 
    458463            break; 
    459464 
    460465        case OPT_PASSWORD:   /* authentication password */ 
    461             cur_acc->cred_count = 1; 
    462             cur_acc->cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; 
    463             cur_acc->cred_info[0].data = pj_str(pj_optarg); 
     466            cur_acc->cred_info[cur_acc->cred_count].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; 
     467            cur_acc->cred_info[cur_acc->cred_count].data = pj_str(pj_optarg); 
     468            break; 
     469 
     470        case OPT_NEXT_CRED: /* next credential */ 
     471            cur_acc->cred_count++; 
    464472            break; 
    465473 
     
    543551            break; 
    544552 
     553        /* These options were no longer valid after new pjsua */ 
     554        /* 
    545555        case OPT_COMPLEXITY: 
    546556            cfg->complexity = my_atoi(pj_optarg); 
     
    561571            break; 
    562572 
     573        case OPT_DURATION: 
     574            cfg->duration = my_atoi(pj_optarg); 
     575            break; 
     576 
    563577        case OPT_PTIME: 
    564578            cfg->ptime = my_atoi(pj_optarg); 
     
    569583            } 
    570584            break; 
     585 
     586        */ 
    571587 
    572588        case OPT_AUTO_ANSWER: 
     
    588604            break; 
    589605 
    590         case OPT_DURATION: 
    591             cfg->duration = my_atoi(pj_optarg); 
    592             break; 
    593  
    594606        default: 
    595607            PJ_LOG(1,(THIS_FILE, "Invalid argument %s", argv[pj_optind-1])); 
     
    633645 
    634646    for (i=0; i<cfg->acc_cnt; ++i) { 
    635         if (cfg->acc_cfg[i].cred_info[0].username.slen || 
    636             cfg->acc_cfg[i].cred_info[0].realm.slen) 
     647        if (cfg->acc_cfg[i].cred_info[cfg->acc_cfg[i].cred_count].username.slen) 
    637648        { 
    638             cfg->acc_cfg[i].cred_count = 1; 
    639             cfg->acc_cfg[i].cred_info[0].scheme = pj_str("digest"); 
     649            cfg->acc_cfg[i].cred_count++; 
    640650        } 
    641651    } 
     
    718728            pj_strcat2(result, line); 
    719729        } 
     730 
     731        if (i != acc_cfg->cred_count - 1) 
     732            pj_strcat2(result, "--next-cred\n"); 
    720733    } 
    721734 
Note: See TracChangeset for help on using the changeset viewer.