- Timestamp:
- Jan 21, 2008 9:20:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/users/nanang/pjsip-apps/src/pjsua/pjsua_app.c
r1720 r1723 121 121 puts ("SIP Account options:"); 122 122 puts (" --use-ims Enable 3GPP/IMS related settings on this account"); 123 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 123 124 puts (" --use-srtp=N Use SRTP N= 0: disabled, 1: optional, 2: mandatory"); 125 #endif 124 126 puts (" --registrar=url Set the URL of registrar server"); 125 127 puts (" --id=url Set the URL of local ID (used in From header)"); … … 443 445 { "rtp-port", 1, 0, OPT_RTP_PORT}, 444 446 { "use-ice", 0, 0, OPT_USE_ICE}, 447 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 445 448 { "use-srtp", 1, 0, OPT_USE_SRTP}, 449 #endif 446 450 { "add-codec", 1, 0, OPT_ADD_CODEC}, 447 451 { "dis-codec", 1, 0, OPT_DIS_CODEC}, … … 474 478 pjsua_acc_config *cur_acc; 475 479 char *config_file = NULL; 476 int use_srtp = -1;477 480 unsigned i; 478 481 … … 800 803 break; 801 804 805 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 802 806 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) { 805 809 PJ_LOG(1,(THIS_FILE, "Invalid value for --use-srtp option")); 806 810 return -1; 807 811 } 808 app_config.cfg.use_srtp = use_srtp;809 break; 812 break; 813 #endif 810 814 811 815 case OPT_RTP_PORT: … … 1039 1043 for (i=0; i<cfg->acc_cnt; ++i) { 1040 1044 pjsua_acc_config *acfg = &cfg->acc_cfg[i]; 1041 1042 acfg->use_srtp = (pjmedia_srtp_use) use_srtp;1043 1045 1044 1046 if (acfg->cred_info[acfg->cred_count].username.slen) … … 1126 1128 } 1127 1129 1130 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 1128 1131 /* SRTP */ 1129 1132 if (acc_cfg->use_srtp) { … … 1132 1135 pj_strcat2(result, line); 1133 1136 } 1137 #endif 1134 1138 1135 1139 /* Proxy */
Note: See TracChangeset
for help on using the changeset viewer.