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
c20dea4b
Commit
c20dea4b
authored
Jan 07, 2016
by
Brieuc Viel
Browse files
Fix JNI crash about LinphoneCall.getCoference()
parent
c253cb7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecore_jni.cc
View file @
c20dea4b
...
...
@@ -4316,8 +4316,8 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getConferenceSize(JNIEnv
}
extern
"C"
jobject
Jave_org_linphone_core_LinphoneCoreImpl_getConference
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
pCore
)
{
jclass
conference_class
=
env
->
FindClass
(
"org/linphone/core/LinphoneConference"
);
jmethodID
conference_constructor
=
env
->
GetMethodID
(
conference_class
,
"<init>"
,
"(J)"
);
jclass
conference_class
=
env
->
FindClass
(
"org/linphone/core/LinphoneConference
Impl
"
);
jmethodID
conference_constructor
=
env
->
GetMethodID
(
conference_class
,
"<init>"
,
"(J)
V
"
);
LinphoneConference
*
conf
=
linphone_core_get_conference
((
LinphoneCore
*
)
pCore
);
if
(
conf
)
return
env
->
NewObject
(
conference_class
,
conference_constructor
,
conf
);
else
return
NULL
;
...
...
@@ -4457,9 +4457,9 @@ extern "C" void Java_org_linphone_core_LinphoneCallImpl_setAuthenticationTokenVe
linphone_call_set_authentication_token_verified
(
call
,
verified
);
}
extern
"C"
jobject
Java_org_linph
n
oe_core_LinphoneCallImpl_getConference
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
ptr
)
{
jclass
conference_class
=
env
->
FindClass
(
"org/linphone/core/LinphoneConference"
);
jmethodID
conference_constructor
=
env
->
GetMethodID
(
conference_class
,
"<init>"
,
"(J)"
);
extern
"C"
jobject
Java_org_linpho
n
e_core_LinphoneCallImpl_getConference
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
ptr
)
{
jclass
conference_class
=
env
->
FindClass
(
"org/linphone/core/LinphoneConference
Impl
"
);
jmethodID
conference_constructor
=
env
->
GetMethodID
(
conference_class
,
"<init>"
,
"(J)
V
"
);
LinphoneConference
*
conf
=
linphone_call_get_conference
((
LinphoneCall
*
)
ptr
);
if
(
conf
)
return
env
->
NewObject
(
conference_class
,
conference_constructor
,
conf
);
return
NULL
;
...
...
java/common/org/linphone/core/LinphoneCall.java
View file @
c20dea4b
...
...
@@ -280,10 +280,11 @@ public interface LinphoneCall {
*/
boolean
isInConference
();
/**
* Get the pointer on the C conference instance associated to that call.
* @return A positive value if the call is part of a conference, 0 if not.
* Get the conference instance which the call is part of.
* @return An instance of #LinphoneConference if the call is part
* of a conference. null instead.
*/
long
getConference
();
LinphoneConference
getConference
();
/**
* Indicates whether an operation is in progress at the media side.
...
...
java/impl/org/linphone/core/LinphoneCallImpl.java
View file @
c20dea4b
...
...
@@ -165,10 +165,10 @@ class LinphoneCallImpl implements LinphoneCall {
}
public
boolean
isInConference
()
{
return
getConference
()
!=
0
;
return
getConference
()
!=
null
;
}
p
rivate
native
long
getConference
(
long
nativePtr
);
public
long
getConference
()
{
p
ublic
native
LinphoneConference
getConference
(
long
nativePtr
);
public
LinphoneConference
getConference
()
{
return
getConference
(
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