- Timestamp:
- Jan 25, 2008 9:02:33 AM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r1735 r1745 122 122 puts (" --use-ims Enable 3GPP/IMS related settings on this account"); 123 123 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 124 puts (" --use-srtp=N Use SRTP N= 0: disabled, 1: optional, 2: mandatory"); 124 puts (" --use-srtp=N Use SRTP? 0:disabled, 1:optional, 2:mandatory (def:0)"); 125 puts (" --srtp-secure=N SRTP require secure SIP? 0:no, 1:tls, 1:sips (def:1)"); 125 126 #endif 126 127 puts (" --registrar=url Set the URL of registrar server"); … … 386 387 OPT_ADD_BUDDY, OPT_OFFER_X_MS_MSG, OPT_NO_PRESENCE, 387 388 OPT_AUTO_ANSWER, OPT_AUTO_HANGUP, OPT_AUTO_PLAY, OPT_AUTO_LOOP, 388 OPT_AUTO_CONF, OPT_CLOCK_RATE, OPT_USE_ICE, OPT_USE_SRTP, 389 OPT_AUTO_CONF, OPT_CLOCK_RATE, OPT_USE_ICE, OPT_USE_SRTP, 390 OPT_SRTP_SECURE, 389 391 OPT_PLAY_FILE, OPT_PLAY_TONE, OPT_RTP_PORT, OPT_ADD_CODEC, 390 392 OPT_ILBC_MODE, OPT_REC_FILE, OPT_AUTO_REC, … … 447 449 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 448 450 { "use-srtp", 1, 0, OPT_USE_SRTP}, 451 { "srtp-secure",1, 0, OPT_SRTP_SECURE}, 449 452 #endif 450 453 { "add-codec", 1, 0, OPT_ADD_CODEC}, … … 811 814 } 812 815 break; 816 case OPT_SRTP_SECURE: 817 app_config.cfg.srtp_secure_signaling = my_atoi(pj_optarg); 818 if (!pj_isdigit(*pj_optarg) || 819 app_config.cfg.srtp_secure_signaling > 2) 820 { 821 PJ_LOG(1,(THIS_FILE, "Invalid value for --srtp-secure option")); 822 return -1; 823 } 824 break; 813 825 #endif 814 826 … … 1267 1279 } 1268 1280 1269 1270 1281 /* TLS */ 1271 1282 if (config->use_tls) … … 1310 1321 1311 1322 pj_strcat2(&cfg, "\n#\n# Media settings:\n#\n"); 1323 1324 /* SRTP */ 1325 if (app_config.cfg.use_srtp != PJSUA_DEFAULT_USE_SRTP) { 1326 pj_ansi_sprintf(line, "--use-srtp %d\n", 1327 app_config.cfg.use_srtp); 1328 pj_strcat2(&cfg, line); 1329 } 1330 if (app_config.cfg.srtp_secure_signaling != 1331 PJSUA_DEFAULT_SRTP_SECURE_SIGNALING) 1332 { 1333 pj_ansi_sprintf(line, "--srtp-secure %d\n", 1334 app_config.cfg.srtp_secure_signaling); 1335 pj_strcat2(&cfg, line); 1336 } 1312 1337 1313 1338 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r1742 r1745 260 260 int i; 261 261 262 for (i=0; i< (str->slen-substr->slen); ++i) {262 for (i=0; i<=(str->slen-substr->slen); ++i) { 263 263 pj_str_t s; 264 264 s.ptr = str->ptr+i;
Note: See TracChangeset
for help on using the changeset viewer.