fix crash with ErrorInfoImpl due to missing symbols

This commit is contained in:
Simon Morlat 2017-05-02 15:13:17 +02:00
parent e112362041
commit 5cde30dae7
2 changed files with 24 additions and 1 deletions

View file

@ -7445,6 +7445,24 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_ErrorInfoImpl_getDetails(JNIEnv
return tmp ? env->NewStringUTF(tmp) : NULL;
}
/*
* Class: org_linphone_core_ErrorInfoImpl
* Method: ref
* Signature: (J);
*/
JNIEXPORT void JNICALL Java_org_linphone_core_ErrorInfoImpl_ref(JNIEnv *env, jobject jobj, jlong ei){
linphone_error_info_ref((LinphoneErrorInfo*)ei);
}
/*
* Class: org_linphone_core_ErrorInfoImpl
* Method: unref
* Signature: (J);
*/
JNIEXPORT void JNICALL Java_org_linphone_core_ErrorInfoImpl_unref(JNIEnv *env, jobject jobj, jlong ei){
linphone_error_info_unref((LinphoneErrorInfo*)ei);
}
#ifdef __cplusplus
}
#endif

View file

@ -98,5 +98,10 @@ public class ErrorInfoImpl implements ErrorInfo {
return getWarnings();
}
protected void finalize() throws Throwable {
if (mNativePtr != 0){
unref(mNativePtr);
mNativePtr = 0;
}
}
}