mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 20:18:09 +00:00
handle the case where the value returned by linphone_proxy_config_get_custom_header() is NULL
This commit is contained in:
parent
c62793c280
commit
c047fa514a
1 changed files with 2 additions and 2 deletions
|
|
@ -4707,9 +4707,9 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setCustomH
|
|||
|
||||
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getCustomHeader(JNIEnv *env, jobject thiz, jlong ptr, jstring jname) {
|
||||
const char *name = jname ? env->GetStringUTFChars(jname, NULL) : NULL;
|
||||
jstring jvalue = env->NewStringUTF(linphone_proxy_config_get_custom_header((LinphoneProxyConfig *)ptr, name));
|
||||
const char *value = linphone_proxy_config_get_custom_header((LinphoneProxyConfig *)ptr, name);
|
||||
if (jname) env->ReleaseStringUTFChars(jname, name);
|
||||
return jvalue;
|
||||
return value ? env->NewStringUTF(value) : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue