diff --git a/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java b/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java index 3b242e00a..d2f635d4d 100644 --- a/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java +++ b/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java @@ -97,7 +97,9 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory { String userConfig, String factoryConfig, Object userdata) throws LinphoneCoreException { try { - return new LinphoneCoreImpl(listener,new File(userConfig),new File(factoryConfig),userdata); + File user = userConfig == null ? null : new File(userConfig); + File factory = factoryConfig == null ? null : new File(factoryConfig); + return new LinphoneCoreImpl(listener, user, factory, userdata); } catch (IOException e) { throw new LinphoneCoreException("Cannot create LinphoneCore",e); } diff --git a/java/impl/org/linphone/core/LinphoneCoreImpl.java b/java/impl/org/linphone/core/LinphoneCoreImpl.java index 887c9d3da..f5740ff41 100644 --- a/java/impl/org/linphone/core/LinphoneCoreImpl.java +++ b/java/impl/org/linphone/core/LinphoneCoreImpl.java @@ -145,12 +145,14 @@ class LinphoneCoreImpl implements LinphoneCore { private native void setChatDatabasePath(long nativePtr, String path); private native long[] getChatRooms(long nativePtr); - LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException { - mListener=listener; - nativePtr = newLinphoneCore(listener,userConfig.getCanonicalPath(),factoryConfig.getCanonicalPath(),userdata); + LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig, File factoryConfig, Object userdata) throws IOException { + mListener = listener; + String user = userConfig == null ? null : userConfig.getCanonicalPath(); + String factory = factoryConfig == null ? null : factoryConfig.getCanonicalPath(); + nativePtr = newLinphoneCore(listener, user, factory, userdata); } LinphoneCoreImpl(LinphoneCoreListener listener) throws IOException { - mListener=listener; + mListener = listener; nativePtr = newLinphoneCore(listener,null,null,null); } diff --git a/java/impl/org/linphone/core/LinphoneProxyConfigImpl.java b/java/impl/org/linphone/core/LinphoneProxyConfigImpl.java index a62db0b85..b2e019cb4 100644 --- a/java/impl/org/linphone/core/LinphoneProxyConfigImpl.java +++ b/java/impl/org/linphone/core/LinphoneProxyConfigImpl.java @@ -37,6 +37,7 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig { nativePtr = newLinphoneProxyConfig(); setIdentity(identity); setProxy(proxy); + setRoute(route); enableRegister(enableRegister); ownPtr=true; }