forked from mirrors/linphone-iphone
add domain_name to rc
This commit is contained in:
parent
d1bad67efc
commit
9b57a31564
3 changed files with 28 additions and 5 deletions
|
|
@ -53,7 +53,12 @@
|
|||
assistant_activate_phone_number_link);
|
||||
|
||||
LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(LC);
|
||||
if (cfg && strcmp("sip.linphone.org", linphone_proxy_config_get_domain(cfg)) == 0) {
|
||||
if (cfg &&
|
||||
strcmp([LinphoneManager.instance lpConfigStringForKey:@"domain_name"
|
||||
inSection:@"app"
|
||||
withDefault:@"sip.linphone.org"]
|
||||
.UTF8String,
|
||||
linphone_proxy_config_get_domain(cfg)) == 0) {
|
||||
linphone_account_creator_set_username(
|
||||
account_creator, linphone_address_get_username(linphone_proxy_config_get_identity_address(cfg)));
|
||||
const LinphoneAuthInfo *info = linphone_proxy_config_find_auth_info(cfg);
|
||||
|
|
|
|||
|
|
@ -301,7 +301,12 @@
|
|||
- (NSString *)getPassword {
|
||||
NSString *pass;
|
||||
LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(LC);
|
||||
if (cfg && strcmp("sip.linphone.org", linphone_proxy_config_get_domain(cfg)) == 0) {
|
||||
if (cfg &&
|
||||
strcmp([LinphoneManager.instance lpConfigStringForKey:@"domain_name"
|
||||
inSection:@"app"
|
||||
withDefault:@"sip.linphone.org"]
|
||||
.UTF8String,
|
||||
linphone_proxy_config_get_domain(cfg)) == 0) {
|
||||
const LinphoneAuthInfo *info = linphone_proxy_config_find_auth_info(cfg);
|
||||
const char *tmpPass;
|
||||
if (linphone_auth_info_get_passwd(info)) {
|
||||
|
|
|
|||
|
|
@ -501,7 +501,11 @@ exit_dbmigration:
|
|||
LinphoneProxyConfig *proxy = (LinphoneProxyConfig *)proxies->data;
|
||||
const char *addr = linphone_proxy_config_get_addr(proxy);
|
||||
// we want to enable AVPF for the proxies
|
||||
if (addr && strstr(addr, "sip.linphone.org") != 0) {
|
||||
if (addr &&
|
||||
strstr(addr, [LinphoneManager.instance lpConfigStringForKey:@"domain_name"
|
||||
inSection:@"app"
|
||||
withDefault:@"sip.linphone.org"]
|
||||
.UTF8String) != 0) {
|
||||
LOGI(@"Migrating proxy config to use AVPF");
|
||||
linphone_proxy_config_enable_avpf(proxy, TRUE);
|
||||
}
|
||||
|
|
@ -516,7 +520,11 @@ exit_dbmigration:
|
|||
LinphoneProxyConfig *proxy = (LinphoneProxyConfig *)proxies->data;
|
||||
const char *addr = linphone_proxy_config_get_addr(proxy);
|
||||
// we want to enable quality reporting for the proxies that are on linphone.org
|
||||
if (addr && strstr(addr, "sip.linphone.org") != 0) {
|
||||
if (addr &&
|
||||
strstr(addr, [LinphoneManager.instance lpConfigStringForKey:@"domain_name"
|
||||
inSection:@"app"
|
||||
withDefault:@"sip.linphone.org"]
|
||||
.UTF8String) != 0) {
|
||||
LOGI(@"Migrating proxy config to send quality report");
|
||||
linphone_proxy_config_set_quality_reporting_collector(
|
||||
proxy, "sip:voip-metrics@sip.linphone.org;transport=tls");
|
||||
|
|
@ -1918,7 +1926,12 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
|
|||
[LinphoneManager.instance lpConfigSetInt:0 forKey:@"must_link_account_time"];
|
||||
} else {
|
||||
LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(LC);
|
||||
if (cfg) {
|
||||
if (cfg &&
|
||||
strcmp(linphone_proxy_config_get_domain(cfg),
|
||||
[LinphoneManager.instance lpConfigStringForKey:@"domain_name"
|
||||
inSection:@"app"
|
||||
withDefault:@"sip.linphone.org"]
|
||||
.UTF8String) == 0) {
|
||||
UIAlertController *errView = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Link your account", nil)
|
||||
message:[NSString stringWithFormat:NSLocalizedString(@"Link your Linphone.org account %s to your phone number.", nil),
|
||||
linphone_address_get_username(linphone_proxy_config_get_identity_address(cfg))]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue