Commit 4fe85734 authored by Simon Morlat's avatar Simon Morlat
Browse files

add JNI implementation for LinphoneCore.setDnsServers()

parent a0646a0f
......@@ -6492,6 +6492,25 @@ extern "C" jboolean JNICALL Java_org_linphone_core_LinphoneCoreImpl_videoMultica
return linphone_core_video_multicast_enabled((LinphoneCore*)ptr);
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setDnsServers(JNIEnv *env, jobject thiz, jlong lc, jobjectArray servers){
MSList *l = NULL;
if (servers != NULL){
int count = env->GetArrayLength(servers);
for (int i=0; i < count; i++) {
jstring server = (jstring) env->GetObjectArrayElement(servers, i);
const char *str = env->GetStringUTFChars(server, NULL);
if (str){
l = ms_list_append(l, ms_strdup(str));
env->ReleaseStringUTFChars(server, str);
linphone_core_set_dns_servers((LinphoneCore*)lc, l);
ms_list_free_with_data(l, ms_free);
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_enableDnsSrv(JNIEnv *env, jobject thiz, jlong lc, jboolean yesno) {
linphone_core_enable_dns_srv((LinphoneCore *)lc, yesno);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment