diff --git a/Classes/IncallViewController.m b/Classes/IncallViewController.m index 436e65921..0768fa60d 100644 --- a/Classes/IncallViewController.m +++ b/Classes/IncallViewController.m @@ -932,7 +932,11 @@ static void hideSpinner(LinphoneCall* call, void* user_data) { } else { switch (linphone_call_get_state(call)) { case LinphoneCallPaused: - [ms appendFormat:@"%@", NSLocalizedString(@"Paused (tap to resume)", nil), nil]; + if(!linphone_core_sound_resources_locked(linphone_call_get_core(call))) { + [ms appendFormat:@"%@", NSLocalizedString(@"Paused (tap to resume)", nil), nil]; + } else { + [ms appendFormat:@"%@", NSLocalizedString(@"Paused", nil), nil]; + } break; case LinphoneCallOutgoingInit: case LinphoneCallOutgoingProgress: @@ -1242,7 +1246,9 @@ static void hideSpinner(LinphoneCall* call, void* user_data) { if (linphone_core_is_in_conference(lc)) { linphone_core_leave_conference(lc); } - linphone_core_resume_call([LinphoneManager getLc], selectedCall); + if(!linphone_core_sound_resources_locked(lc)) { + linphone_core_resume_call([LinphoneManager getLc], selectedCall); + } } [self updateUIFromLinphoneState: YES]; diff --git a/Classes/LinphoneUI/LinphoneManager.h b/Classes/LinphoneUI/LinphoneManager.h index 15b692a2c..2abd50af8 100644 --- a/Classes/LinphoneUI/LinphoneManager.h +++ b/Classes/LinphoneUI/LinphoneManager.h @@ -97,7 +97,7 @@ typedef struct _LinphoneCallAppData { -(UIImage*) getImageFromAddressBook:(NSString*) number; -(BOOL) reconfigureLinphoneIfNeeded:(NSDictionary *)oldSettings; --(void) setupNetworkReachabilityCallback: (const char*) nodeName withContext:(SCNetworkReachabilityContext*) ctx; +-(void) setupNetworkReachabilityCallback; -(void) refreshRegisters; @property (nonatomic, retain) id callDelegate; diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 2ee652b28..f30a19c4b 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -147,6 +147,14 @@ extern void libmsbcg729_init(); } -(void) onCall:(LinphoneCall*) call StateChanged: (LinphoneCallState) new_state withMessage: (const char *) message { + if(new_state == LinphoneCallReleased) { + if(linphone_call_get_user_pointer(call) != NULL) { + free (linphone_call_get_user_pointer(call)); + linphone_call_set_user_pointer(call, NULL); + } + return; + } + const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(call)); NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil); if (new_state == LinphoneCallIncomingReceived) { @@ -275,9 +283,6 @@ extern void libmsbcg729_init(); [callDelegate displayInCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName]; } break; - case LinphoneCallReleased: - free (linphone_call_get_user_pointer(call)); - break; default: break; } @@ -931,9 +936,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach linphone_core_iterate(theLinphoneCore); } --(void) setupNetworkReachabilityCallback: (const char*) nodeName withContext:(SCNetworkReachabilityContext*) ctx { +-(void) setupNetworkReachabilityCallback { + SCNetworkReachabilityContext *ctx=NULL; + const char *nodeName="linphone.org"; + if (proxyReachability) { - ms_message("Cancel old network reachability check"); + ms_message("Cancelling old network reachability"); SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); CFRelease(proxyReachability); proxyReachability = nil; @@ -1024,7 +1032,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach linphone_core_set_zrtp_secrets_file(theLinphoneCore, [zrtpSecretsFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]); - [self setupNetworkReachabilityCallback: "linphone.org" withContext:nil]; + [self setupNetworkReachabilityCallback]; [self reconfigureLinphoneIfNeeded:nil]; @@ -1095,9 +1103,16 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach if (proxyReachability){ SCNetworkReachabilityFlags flags=0; if (!SCNetworkReachabilityGetFlags(proxyReachability, &flags)) { - ms_error("Cannot get reachability flags"); - }else - networkReachabilityCallBack(proxyReachability, flags, 0); + ms_error("Cannot get reachability flags, re-creating reachability context."); + [self setupNetworkReachabilityCallback]; + }else{ + networkReachabilityCallBack(proxyReachability, flags, 0); + if (flags==0){ + /*workaround iOS bug: reachability API cease to work after some time.*/ + /*when flags==0, either we have no network, or the reachability object lies. To workaround, create a new one*/ + [self setupNetworkReachabilityCallback]; + } + } }else ms_error("No proxy reachability context created !"); linphone_core_refresh_registers(theLinphoneCore);//just to make sure REGISTRATION is up to date } diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index 7309144ad..91872a2c4 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -270,9 +270,9 @@ mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username] delegate:cd - cancelButtonTitle:NSLocalizedString(@"Decline",nil) + cancelButtonTitle:nil destructiveButtonTitle:NSLocalizedString(@"Answer",nil) - otherButtonTitles:nil]; + otherButtonTitles:NSLocalizedString(@"Decline",nil),nil]; mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault; if ([LinphoneManager runningOnIpad]) { diff --git a/linphone-Info.plist b/linphone-Info.plist index 9558573e0..45828b413 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -24,11 +24,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.5.0 + 3.5.2 CFBundleSignature ???? CFBundleVersion - 1.1.2 + 1.3 NSMainNibFile PhoneMainView NSMainNibFile~ipad diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 043883ce6..5dba02990 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -1596,7 +1596,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1635,7 +1635,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 3.1; LIBRARY_SEARCH_PATHS = ""; LINK_WITH_STANDARD_LIBRARIES = YES; - PROVISIONING_PROFILE = "32E63D15-36ED-474A-8157-8DD0770DF063"; + PROVISIONING_PROFILE = "B8ED8915-B69D-40DA-9B89-1700C44B156B"; SDKROOT = iphoneos; }; name = DistributionAdhoc; @@ -1662,7 +1662,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1942,7 +1942,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -2009,7 +2009,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, diff --git a/submodules/linphone b/submodules/linphone index bad6c152f..2d669353c 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit bad6c152f1521de8648d47c70e9321b7668b40b5 +Subproject commit 2d669353c3eda22e63023fde2f3cde7b437d2c81