assistant: display error if network not available

This commit is contained in:
Gautier Pelloux-Prayer 2016-01-21 11:13:17 +01:00
parent 935ea57107
commit f798da2db0

View file

@ -202,6 +202,20 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)configureProxyConfig {
LinphoneManager *lm = LinphoneManager.instance;
if (!linphone_core_is_network_reachable(LC)) {
UIAlertView *error =
[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error", nil)
message:NSLocalizedString(@"There is no network connection available, enable "
@"WIFI or WWAN prior to configure an account",
nil)
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Cancel", nil)
otherButtonTitles:nil];
[error show];
_waitView.hidden = YES;
return;
}
// remove previous proxy config, if any
if (new_config != NULL) {
const LinphoneAuthInfo *auth = linphone_proxy_config_find_auth_info(new_config);