Commit dbba820b authored by Sylvain Berfini's avatar Sylvain Berfini

Route was never set at the proxy config creation + allow linphonecore to init...

Route was never set at the proxy config creation + allow linphonecore to init without linphonerc nor factory
parent 68a23b44
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -37,6 +37,7 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
nativePtr = newLinphoneProxyConfig();
setIdentity(identity);
setProxy(proxy);
setRoute(route);
enableRegister(enableRegister);
ownPtr=true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment