forked from mirrors/linphone-iphone
enable login phone number with sha256
This commit is contained in:
parent
37a34b41e0
commit
9ecc78d82f
2 changed files with 19 additions and 1 deletions
|
|
@ -169,6 +169,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
assistant_recover_phone_account);
|
||||
linphone_account_creator_cbs_set_is_account_linked(linphone_account_creator_get_callbacks(account_creator),
|
||||
assistant_is_account_linked);
|
||||
linphone_account_creator_cbs_set_login_linphone_account(linphone_account_creator_get_callbacks(account_creator), assistant_login_linphone_account);
|
||||
|
||||
}
|
||||
- (void)loadAssistantConfig:(NSString *)rcFilename {
|
||||
|
|
@ -1138,6 +1139,18 @@ void assistant_activate_account(LinphoneAccountCreator *creator, LinphoneAccount
|
|||
}
|
||||
}
|
||||
|
||||
void assistant_login_linphone_account(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status,
|
||||
const char *resp) {
|
||||
AssistantView *thiz = (__bridge AssistantView *)(linphone_account_creator_get_user_data(creator));
|
||||
thiz.waitView.hidden = YES;
|
||||
if (status == LinphoneAccountCreatorStatusRequestOk) {
|
||||
[thiz configureProxyConfig];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneAddressBookUpdate object:NULL];
|
||||
} else {
|
||||
[thiz showErrorPopup:resp];
|
||||
}
|
||||
}
|
||||
|
||||
void assistant_is_account_activated(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status,
|
||||
const char *resp) {
|
||||
AssistantView *thiz = (__bridge AssistantView *)(linphone_account_creator_get_user_data(creator));
|
||||
|
|
@ -1292,8 +1305,12 @@ void assistant_is_account_linked(LinphoneAccountCreator *creator, LinphoneAccoun
|
|||
((UITextField *)[self findView:ViewElement_SMSCode inView:_contentView ofType:UITextField.class])
|
||||
.text.UTF8String);
|
||||
if (linphone_account_creator_get_password(account_creator) == NULL &&
|
||||
linphone_account_creator_get_ha1(account_creator) == NULL) {
|
||||
linphone_account_creator_get_ha1(account_creator) == NULL) {
|
||||
if ([_activationTitle.text isEqualToString:@"USE LINPHONE ACCOUNT"]) {
|
||||
linphone_account_creator_login_linphone_account(account_creator);
|
||||
} else {
|
||||
linphone_account_creator_activate_account(account_creator);
|
||||
}
|
||||
} else {
|
||||
NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
|
||||
linphone_account_creator_set_language(account_creator, [[language substringToIndex:2] UTF8String]);
|
||||
|
|
|
|||
|
|
@ -882,6 +882,7 @@ void update_hash_cbs(LinphoneAccountCreator *creator, LinphoneAccountCreatorStat
|
|||
completion:nil];
|
||||
return;
|
||||
}
|
||||
linphone_account_creator_set_algorithm(account_creator, "");
|
||||
linphone_account_creator_set_username(account_creator, linphone_auth_info_get_username(ai));
|
||||
if (linphone_auth_info_get_passwd(ai) && !(strcmp(linphone_auth_info_get_passwd(ai),"") == 0)) {
|
||||
linphone_account_creator_set_password(account_creator, linphone_auth_info_get_passwd(ai));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue