From de1ecec3a5fd094720a20d16a299cb774493a697 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 14 Aug 2012 13:04:40 +0200 Subject: [PATCH] Fix Wizard messagebox when communication/http error --- Classes/WizardViewController.m | 12 ++++++------ Classes/WizardViewController.xib | 2 +- Resources/en.lproj/Localizable.strings | Bin 13432 -> 13344 bytes 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index 35d50eae7..d14f08d26 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -503,7 +503,7 @@ static UICompositeViewDescription *compositeDescription = nil; #pragma mark - XMLRPCConnectionDelegate Functions -- (void)request: (XMLRPCRequest *)request didReceiveResponse: (XMLRPCResponse *)response { +- (void)request:(XMLRPCRequest *)request didReceiveResponse:(XMLRPCResponse *)response { [LinphoneLogger log:LinphoneLoggerDebug format:@"XMLRPC %@: %@", [request method], [response body]]; [waitView setHidden:true]; if ([response isFault]) { @@ -515,7 +515,7 @@ static UICompositeViewDescription *compositeDescription = nil; otherButtonTitles:nil,nil]; [errorView show]; [errorView release]; - } else { + } else if([response object] != nil) { //Don't handle if not object: HTTP/Communication Error if([[request method] isEqualToString:@"check_account"]) { if([response object] == [NSNumber numberWithInt:1]) { UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Check issue",nil) @@ -565,7 +565,7 @@ static UICompositeViewDescription *compositeDescription = nil; } } -- (void)request: (XMLRPCRequest *)request didFailWithError: (NSError *)error { +- (void)request:(XMLRPCRequest *)request didFailWithError:(NSError *)error { NSString *errorString = [NSString stringWithFormat:NSLocalizedString(@"Can't create account: Communication issue (%@)", nil), [error localizedDescription]]; UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Communication issue", nil) message:errorString @@ -577,15 +577,15 @@ static UICompositeViewDescription *compositeDescription = nil; [waitView setHidden:true]; } -- (BOOL)request: (XMLRPCRequest *)request canAuthenticateAgainstProtectionSpace: (NSURLProtectionSpace *)protectionSpace { +- (BOOL)request:(XMLRPCRequest *)request canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { return FALSE; } -- (void)request: (XMLRPCRequest *)request didReceiveAuthenticationChallenge: (NSURLAuthenticationChallenge *)challenge { +- (void)request:(XMLRPCRequest *)request didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { } -- (void)request: (XMLRPCRequest *)request didCancelAuthenticationChallenge: (NSURLAuthenticationChallenge *)challenge { +- (void)request:(XMLRPCRequest *)request didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { } diff --git a/Classes/WizardViewController.xib b/Classes/WizardViewController.xib index 9d175e6d6..90049c4fa 100644 --- a/Classes/WizardViewController.xib +++ b/Classes/WizardViewController.xib @@ -401,7 +401,7 @@ 200 NO IBCocoaTouchFramework - Enter you username and password with your SIP domain + Enter you username and password with your email address 0 diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 0f3dedb8c13983782fa3e30ad067350153a4a6be..58075abdac672175be6d344f3d8dd806ffb5d752 100644 GIT binary patch delta 28 icmey7u^?lE3HRhJ{3?@Qaq~=`z|93>Z+^wyrvU)5+6#67 delta 44 ncmZ3G@grk{3HRi0+!B+;c=(vD7!)QOa@(TujW^HZZqfh%Mga{3