diff --git a/Classes/LinphoneUI/FastAddressBook.m b/Classes/LinphoneUI/FastAddressBook.m index ffb7e4336..ab1ccabeb 100644 --- a/Classes/LinphoneUI/FastAddressBook.m +++ b/Classes/LinphoneUI/FastAddressBook.m @@ -60,8 +60,8 @@ void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void Contact* lContact = [[Contact alloc] initWithRecord:lPerson ofType:(NSString *)lLocalizedLabel]; [lAddressBookMap setObject:lContact forKey:lNormalizedKey]; CFRelease(lValue); - CFRelease(lLabel); - CFRelease(lLocalizedLabel); + if (lLabel) CFRelease(lLabel); + if (lLocalizedLabel) CFRelease(lLocalizedLabel); } CFRelease(lPhoneNumbers); } @@ -86,7 +86,7 @@ void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void -(id) initWithRecord:(ABRecordRef) aRecord ofType:(NSString*) type { if ((self = [super init])) { record=CFRetain(aRecord); - numberType= [type retain]; + numberType= type?[type retain]:@"unkown"; } return self; } diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index a67f41362..d977177d4 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -462,6 +462,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach linphone_proxy_config_set_identity(proxyCfg,identity); linphone_proxy_config_set_server_addr(proxyCfg,proxy); linphone_proxy_config_enable_register(proxyCfg,true); + linphone_proxy_config_expires(proxyCfg, 600); if (isOutboundProxy) linphone_proxy_config_set_route(proxyCfg,proxy); @@ -686,19 +687,23 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach ,self); [[NSUserDefaults standardUserDefaults] synchronize];//sync before loading config - [ self doLinphoneConfiguration:nil]; + proxyReachability=SCNetworkReachabilityCreateWithName(nil, "linphone.org"); proxyReachabilityContext.info=self; + //initial state is network off should be done as soon as possible + SCNetworkReachabilityFlags flags; + SCNetworkReachabilityGetFlags(proxyReachability, &flags); + networkReachabilityCallBack(proxyReachability,flags,self); + SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext); SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); - + + [self doLinphoneConfiguration:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doLinphoneConfiguration:) name:NSUserDefaultsDidChangeNotification object:nil]; - //initial state is network off should be done as soon as possible - linphone_core_set_network_reachable(theLinphoneCore,false); // start scheduler mIterateTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self @@ -717,6 +722,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach otherButtonTitles:nil ,nil]; [error show]; } + if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] + && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground) { + //go directly to bg mode + [self enterBackgroundMode]; + } + ms_warning("Linphone [%s] started on [%s]" ,linphone_core_get_version() ,[[UIDevice currentDevice].model cStringUsingEncoding:[NSString defaultCStringEncoding]] ); diff --git a/linphone-Info.plist b/linphone-Info.plist index a5e170a9f..44b4788bb 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -19,11 +19,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.4.3 + 3.4.4 CFBundleSignature ???? CFBundleVersion - 1.0.5 + 1.0.6 NSMainNibFile PhoneMainView UIApplicationExitsOnSuspend diff --git a/submodules/build/Makefile b/submodules/build/Makefile index 0b6b48f02..9c2e11552 100644 --- a/submodules/build/Makefile +++ b/submodules/build/Makefile @@ -32,3 +32,8 @@ clean-makefile: make -f builder-iphone-simulator.mk clean-makefile \ && make -f builder-iphone-os.mk clean-makefile \ && make -f builder-iphone-os.mk host=armv7-apple-darwin clean-makefile + +veryclean: + make -f builder-iphone-simulator.mk veryclean \ + && make -f builder-iphone-os.mk veryclean \ + && make -f builder-iphone-os.mk host=armv7-apple-darwin veryclean diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index 0ff3366ca..dea57c805 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -78,7 +78,7 @@ init: mkdir -p $(prefix)/include mkdir -p $(prefix)/lib -veryclean: +veryclean: veryclean-linphone rm -rf $(BUILDER_BUILD_DIR) .NOTPARALLEL build-linphone: init build-openssl build-osip2 build-eXosip2 build-speex build-libgsm build-ffmpeg $(LINPHONE_BUILD_DIR)/Makefile @@ -87,9 +87,9 @@ veryclean: clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-msilbc clean-libilbc clean-openssl clean-msamr clean-ffmpeg clean-msx264 cd $(LINPHONE_BUILD_DIR) && make clean -veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr veryclean-msx264 - cd $(LINPHONE_BUILD_DIR) && make distclean - cd $(LINPHONE_SRC_DIR) && rm -f configure +veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr veryclean-msx264 +#-cd $(LINPHONE_BUILD_DIR) && make distclean + -cd $(LINPHONE_SRC_DIR) && rm -f configure clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl clean-makefile-msamr clean-makefile-ffmpeg cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile @@ -133,8 +133,8 @@ clean-osip2: cd $(BUILDER_BUILD_DIR)/$(osip_dir) && make clean veryclean-osip2: - cd $(BUILDER_BUILD_DIR)/$(osip_dir) && make distclean - cd $(BUILDER_SRC_DIR)/$(osip_dir) && rm -f configure +# -cd $(BUILDER_BUILD_DIR)/$(osip_dir) && make distclean + -cd $(BUILDER_SRC_DIR)/$(osip_dir) && rm -f configure clean-makefile-osip2: cd $(BUILDER_BUILD_DIR)/$(osip_dir) && rm -f Makefile @@ -158,7 +158,8 @@ clean-eXosip2: cd $(BUILDER_BUILD_DIR)/$(eXosip_dir) && make clean veryclean-eXosip2: - cd $(BUILDER_BUILD_DIR)/$(eXosip_dir) && make distclean +# -cd $(BUILDER_BUILD_DIR)/$(eXosip_dir) && make distclean + -rm -f $(BUILDER_SRC_DIR)/$(eXosip_dir)/configure clean-makefile-eXosip2: cd $(BUILDER_BUILD_DIR)/$(eXosip_dir) && rm -f Makefile @@ -182,7 +183,8 @@ clean-speex: cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make clean veryclean-speex: - cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make distclean +# -cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make distclean + -rm -f $(BUILDER_SRC_DIR)/$(speex_dir)/configure clean-makefile-speex: cd $(BUILDER_BUILD_DIR)/$(speex_dir) && rm -f Makefile @@ -202,8 +204,8 @@ clean-libgsm: cd $(BUILDER_BUILD_DIR)/$(gsm_dir)\ && make clean -veryclean-libgsm: clean-libgsm - cd $(BUILDER_BUILD_DIR)/$(gsm_dir)) \ +veryclean-libgsm: + -cd $(BUILDER_BUILD_DIR)/$(gsm_dir) \ && make uninstall @@ -226,8 +228,8 @@ clean-msilbc: cd $(MSILBC_BUILD_DIR) && make clean veryclean-msilbc: - cd $(MSILBC_BUILD_DIR) && make distclean - cd $(MSILBC_BUILD_DIR) && rm configure +# -cd $(MSILBC_BUILD_DIR) && make distclean + -cd $(MSILBC_SRC_DIR) && rm configure clean-makefile-msilbc: cd $(MSILBC_BUILD_DIR) && rm -f Makefile @@ -250,8 +252,8 @@ clean-libilbc: cd $(LIBILBC_BUILD_DIR) && make clean veryclean-libilbc: - cd $(LIBILBC_BUILD_DIR) && make distclean - cd $(LIBILBC_BUILD_DIR) && rm -f configure +# -cd $(LIBILBC_BUILD_DIR) && make distclean + -cd $(LIBILBC_SRC_DIR) && rm -f configure clean-makefile-libilbc: cd $(LIBILBC_BUILD_DIR) && rm -f Makefile diff --git a/submodules/build/builders.d/msamr.mk b/submodules/build/builders.d/msamr.mk index d251a01c7..03db5fd88 100644 --- a/submodules/build/builders.d/msamr.mk +++ b/submodules/build/builders.d/msamr.mk @@ -36,7 +36,8 @@ clean-msamr: clean-opencore-amr cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && make clean veryclean-msamr: veryclean-opencore-amr - cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && make distclean && rm -f configure + -cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && make distclean + rm -f $(BUILDER_SRC_DIR)/$(msamr_dir)/configure clean-makefile-msamr: clean-makefile-opencore-amr cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && rm -f Makefile diff --git a/submodules/build/builders.d/opencore-amr.mk b/submodules/build/builders.d/opencore-amr.mk index 14eddd265..99eb76438 100644 --- a/submodules/build/builders.d/opencore-amr.mk +++ b/submodules/build/builders.d/opencore-amr.mk @@ -37,8 +37,8 @@ clean-opencore-amr: cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && make clean veryclean-opencore-amr: - cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && make distclean - cd $(BUILDER_SRC_DIR)/$(opencore-amr_dir) && rm -f configure + -cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && make distclean + -rm -rf $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) clean-makefile-opencore-amr: cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && rm -f Makefile