Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
9f2f6163
Commit
9f2f6163
authored
Oct 29, 2015
by
Simon Morlat
Browse files
fix tunnelconfig problems
parent
ad29346e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+8
-3
java/impl/org/linphone/core/LinphoneCoreImpl.java
java/impl/org/linphone/core/LinphoneCoreImpl.java
+2
-2
No files found.
coreapi/linphonecore_jni.cc
View file @
9f2f6163
...
...
@@ -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
,
j
object
config
)
{
extern
"C"
void
Java_org_linphone_core_LinphoneCoreImpl_tunnelAddServer
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
pCore
,
j
long
tunnel
config
ptr
)
{
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
);
...
...
java/impl/org/linphone/core/LinphoneCoreImpl.java
View file @
9f2f6163
...
...
@@ -820,10 +820,10 @@ class LinphoneCoreImpl implements LinphoneCore {
tunnelAddServerAndMirror
(
nativePtr
,
host
,
port
,
mirror
,
ms
);
}
private
native
void
tunnelAddServer
(
long
nativePtr
,
TunnelConfi
g
config
);
private
native
void
tunnelAddServer
(
long
nativePtr
,
lon
g
config
Ptr
);
@Override
public
synchronized
void
tunnelAddServer
(
TunnelConfig
config
)
{
tunnelAddServer
(
nativePtr
,
config
);
tunnelAddServer
(
nativePtr
,
((
TunnelConfigImpl
)
config
).
mNativePtr
);
}
private
native
final
TunnelConfig
[]
tunnelGetServers
(
long
nativePtr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment