Ignore:
Timestamp:
Jan 21, 2008 9:20:58 PM (16 years ago)
Author:
nanang
Message:

Ticket #452:

  • Applied preprocessor PJMEDIA_HAS_SRTP in PJMEDIA & PJSUA.
  • Applied preprocessor PJSUA_DEFAULT_USE_SRTP and PJSUA_DEFAULT_SRTP_SECURE_SIGNALING in PJSUA
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/users/nanang/pjsip-apps/src/pjsua/pjsua_app.c

    r1720 r1723  
    121121    puts  ("SIP Account options:"); 
    122122    puts  ("  --use-ims           Enable 3GPP/IMS related settings on this account"); 
     123#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
    123124    puts  ("  --use-srtp=N        Use SRTP N= 0: disabled, 1: optional, 2: mandatory"); 
     125#endif 
    124126    puts  ("  --registrar=url     Set the URL of registrar server"); 
    125127    puts  ("  --id=url            Set the URL of local ID (used in From header)"); 
     
    443445        { "rtp-port",   1, 0, OPT_RTP_PORT}, 
    444446        { "use-ice",    0, 0, OPT_USE_ICE}, 
     447#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
    445448        { "use-srtp",   1, 0, OPT_USE_SRTP}, 
     449#endif 
    446450        { "add-codec",  1, 0, OPT_ADD_CODEC}, 
    447451        { "dis-codec",  1, 0, OPT_DIS_CODEC}, 
     
    474478    pjsua_acc_config *cur_acc; 
    475479    char *config_file = NULL; 
    476     int use_srtp = -1; 
    477480    unsigned i; 
    478481 
     
    800803            break; 
    801804 
     805#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
    802806        case OPT_USE_SRTP: 
    803             use_srtp = my_atoi(pj_optarg); 
    804             if (!pj_isdigit(*pj_optarg) || use_srtp > 2) { 
     807            app_config.cfg.use_srtp = my_atoi(pj_optarg); 
     808            if (!pj_isdigit(*pj_optarg) || app_config.cfg.use_srtp > 2) { 
    805809                PJ_LOG(1,(THIS_FILE, "Invalid value for --use-srtp option")); 
    806810                return -1; 
    807811            } 
    808             app_config.cfg.use_srtp = use_srtp; 
    809             break; 
     812            break; 
     813#endif 
    810814 
    811815        case OPT_RTP_PORT: 
     
    10391043    for (i=0; i<cfg->acc_cnt; ++i) { 
    10401044        pjsua_acc_config *acfg = &cfg->acc_cfg[i]; 
    1041  
    1042         acfg->use_srtp = (pjmedia_srtp_use) use_srtp; 
    10431045 
    10441046        if (acfg->cred_info[acfg->cred_count].username.slen) 
     
    11261128    } 
    11271129 
     1130#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
    11281131    /* SRTP */ 
    11291132    if (acc_cfg->use_srtp) { 
     
    11321135        pj_strcat2(result, line); 
    11331136    } 
     1137#endif 
    11341138 
    11351139    /* Proxy */ 
Note: See TracChangeset for help on using the changeset viewer.