- Fixed auto-rejecting of new incoming call.

This commit is contained in:
Juha Heinanen
2019-07-12 15:12:47 +03:00
parent 0533642f59
commit 120ea8a48e
-2
View File
@@ -1074,12 +1074,10 @@ Java_com_tutpro_baresip_Api_ua_1hangup(JNIEnv *env, jobject thiz,
const uint16_t native_code = code; const uint16_t native_code = code;
const char *native_reason = (*env)->GetStringUTFChars(env, reason, 0); const char *native_reason = (*env)->GetStringUTFChars(env, reason, 0);
LOGD("hanging up call %s/%s\n", native_ua, native_call); LOGD("hanging up call %s/%s\n", native_ua, native_call);
re_thread_enter();
if (strlen(native_reason) == 0) if (strlen(native_reason) == 0)
ua_hangup(ua, call, native_code, NULL); ua_hangup(ua, call, native_code, NULL);
else else
ua_hangup(ua, call, native_code, native_reason); ua_hangup(ua, call, native_code, native_reason);
re_thread_leave();
(*env)->ReleaseStringUTFChars(env, javaUA, native_ua); (*env)->ReleaseStringUTFChars(env, javaUA, native_ua);
(*env)->ReleaseStringUTFChars(env, javaCall, native_call); (*env)->ReleaseStringUTFChars(env, javaCall, native_call);
(*env)->ReleaseStringUTFChars(env, reason, native_reason); (*env)->ReleaseStringUTFChars(env, reason, native_reason);