diff --git a/Classes/AssistantLinkView.m b/Classes/AssistantLinkView.m index 8ab9dce98..e268a8281 100644 --- a/Classes/AssistantLinkView.m +++ b/Classes/AssistantLinkView.m @@ -42,9 +42,12 @@ _linkAccountView.hidden = _activateSMSView.userInteractionEnabled = NO; _activateSMSView.hidden = _linkAccountView.userInteractionEnabled = YES; - account_creator = linphone_account_creator_new( - LC, [LinphoneManager.instance lpConfigStringForKey:@"xmlrpc_url" inSection:@"assistant" withDefault:@""] + if (!account_creator) { + account_creator = linphone_account_creator_new( + LC, + [LinphoneManager.instance lpConfigStringForKey:@"xmlrpc_url" inSection:@"assistant" withDefault:@""] .UTF8String); + } linphone_account_creator_set_user_data(account_creator, (__bridge void *)(self)); linphone_account_creator_cbs_set_link_account(linphone_account_creator_get_callbacks(account_creator), diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m index ad90016e6..c98fc0a1d 100644 --- a/Classes/AssistantView.m +++ b/Classes/AssistantView.m @@ -102,6 +102,12 @@ static UICompositeViewDescription *compositeDescription = nil; selector:@selector(configuringUpdate:) name:kLinphoneConfiguringStateUpdate object:nil]; + if (!account_creator) { + account_creator = linphone_account_creator_new( + LC, + [LinphoneManager.instance lpConfigStringForKey:@"xmlrpc_url" inSection:@"assistant" withDefault:@""] + .UTF8String); + } if (!mustRestoreView) { new_config = NULL; @@ -540,7 +546,6 @@ static UICompositeViewDescription *compositeDescription = nil; // every UITextField subviews with phone keyboard must be tweaked to have a done button [self addDoneButtonRecursivelyInView:self.view]; - [self prepareErrorLabels]; }