mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
fix tunnelconfig problems
This commit is contained in:
parent
ad29346e10
commit
9f2f6163d0
2 changed files with 10 additions and 5 deletions
|
|
@ -4259,10 +4259,15 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_tunnelAddServerAndMirror
|
|||
env->ReleaseStringUTFChars(jHost, cHost);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_tunnelAddServer(JNIEnv *env, jobject thiz, jlong pCore, jobject config) {
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_tunnelAddServer(JNIEnv *env, jobject thiz, jlong pCore, jlong tunnelconfigptr) {
|
||||
LinphoneTunnel *tunnel = linphone_core_get_tunnel((LinphoneCore *)pCore);
|
||||
if(tunnel != NULL) {
|
||||
|
||||
LinphoneTunnelConfig *cfg = (LinphoneTunnelConfig*) tunnelconfigptr;
|
||||
if (cfg) {
|
||||
linphone_tunnel_add_server(tunnel, cfg);
|
||||
}else{
|
||||
ms_error("Java TunnelConfig object has no associated C object");
|
||||
}
|
||||
} else {
|
||||
ms_error("LinphoneCore.tunnelAddServer(): tunnel feature is not enabled");
|
||||
}
|
||||
|
|
@ -6322,7 +6327,7 @@ static jobject getTunnelConfig(JNIEnv *env, LinphoneTunnelConfig *cfg){
|
|||
|
||||
if (cfg != NULL){
|
||||
jclass tunnelConfigClass = env->FindClass("org/linphone/core/TunnelConfigImpl");
|
||||
jmethodID ctor = env->GetMethodID(tunnelConfigClass,"<init>", "(j)V");
|
||||
jmethodID ctor = env->GetMethodID(tunnelConfigClass,"<init>", "(J)V");
|
||||
|
||||
void *up=linphone_tunnel_config_get_user_data(cfg);
|
||||
|
||||
|
|
|
|||
|
|
@ -820,10 +820,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
tunnelAddServerAndMirror(nativePtr, host, port, mirror, ms);
|
||||
}
|
||||
|
||||
private native void tunnelAddServer(long nativePtr, TunnelConfig config);
|
||||
private native void tunnelAddServer(long nativePtr, long configPtr);
|
||||
@Override
|
||||
public synchronized void tunnelAddServer(TunnelConfig config) {
|
||||
tunnelAddServer(nativePtr, config);
|
||||
tunnelAddServer(nativePtr, ((TunnelConfigImpl)config).mNativePtr);
|
||||
}
|
||||
|
||||
private native final TunnelConfig[] tunnelGetServers(long nativePtr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue