Changeset 1561 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Nov 8, 2007 9:24:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r1543 r1561 118 118 puts (""); 119 119 puts ("SIP Account options:"); 120 puts (" --use-ims Enable 3GPP/IMS related settings on this account"); 120 121 puts (" --registrar=url Set the URL of registrar server"); 121 122 puts (" --id=url Set the URL of local ID (used in From header)"); … … 129 130 puts (" --publish Send presence PUBLISH for this account"); 130 131 puts (" --use-100rel Require reliable provisional response (100rel)"); 131 puts (" --service-route Enable Service-Route processing");132 132 puts (" --next-cred Add another credentials"); 133 133 puts (""); … … 373 373 OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY, 374 374 OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT, 375 OPT_100REL, OPT_ SERVICE_ROUTE, OPT_REALM, OPT_USERNAME, OPT_PASSWORD,375 OPT_100REL, OPT_USE_IMS, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 376 376 OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV, 377 377 OPT_ADD_BUDDY, OPT_OFFER_X_MS_MSG, OPT_NO_PRESENCE, … … 410 410 { "publish", 0, 0, OPT_PUBLISH}, 411 411 { "use-100rel", 0, 0, OPT_100REL}, 412 { " service-route", 0, 0, OPT_SERVICE_ROUTE},412 { "use-ims", 0, 0, OPT_USE_IMS}, 413 413 { "id", 1, 0, OPT_ID}, 414 414 { "contact", 1, 0, OPT_CONTACT}, … … 637 637 break; 638 638 639 case OPT_ SERVICE_ROUTE: /* Service-Route processing*/640 cur_acc-> enable_service_route= PJ_TRUE;639 case OPT_USE_IMS: /* Activate IMS settings */ 640 cur_acc->auth_pref.initial_auth = PJ_TRUE; 641 641 break; 642 642 … … 668 668 case OPT_USERNAME: /* Default authentication user */ 669 669 cur_acc->cred_info[cur_acc->cred_count].username = pj_str(pj_optarg); 670 cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str(" digest");670 cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str("Digest"); 671 671 break; 672 672 … … 993 993 994 994 for (i=0; i<cfg->acc_cnt; ++i) { 995 if (cfg->acc_cfg[i].cred_info[cfg->acc_cfg[i].cred_count].username.slen) 995 pjsua_acc_config *acfg = &cfg->acc_cfg[i]; 996 997 if (acfg->cred_info[acfg->cred_count].username.slen) 996 998 { 997 cfg->acc_cfg[i].cred_count++; 999 acfg->cred_count++; 1000 } 1001 1002 /* When IMS mode is enabled for the account, verify that settings 1003 * are okay. 1004 */ 1005 /* For now we check if IMS mode is activated by looking if 1006 * initial_auth is set. 1007 */ 1008 if (acfg->auth_pref.initial_auth && acfg->cred_count) { 1009 /* Realm must point to the real domain */ 1010 if (*acfg->cred_info[0].realm.ptr=='*') { 1011 PJ_LOG(1,(THIS_FILE, 1012 "Error: cannot use '*' as realm with IMS")); 1013 return PJ_EINVAL; 1014 } 1015 1016 /* Username for authentication must be in a@b format */ 1017 if (strchr(acfg->cred_info[0].username.ptr, '@')==0) { 1018 PJ_LOG(1,(THIS_FILE, 1019 "Error: Username for authentication must " 1020 "be in user@domain format with IMS")); 1021 return PJ_EINVAL; 1022 } 998 1023 } 999 1024 } … … 2686 2711 acc_cfg.reg_uri = pj_str(registrar); 2687 2712 acc_cfg.cred_count = 1; 2688 acc_cfg.cred_info[0].scheme = pj_str(" digest");2713 acc_cfg.cred_info[0].scheme = pj_str("Digest"); 2689 2714 acc_cfg.cred_info[0].realm = pj_str(realm); 2690 2715 acc_cfg.cred_info[0].username = pj_str(uname);
Note: See TracChangeset
for help on using the changeset viewer.