From ca5128238b4541dfb2bd56d2dec47f9427006e48 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 11 Jul 2013 11:50:47 +0200 Subject: [PATCH] Fix const-correctness in linphone_core_find_call_from_uri --- coreapi/linphonecore.c | 4 ++-- coreapi/linphonecore.h | 2 +- coreapi/linphonecore_jni.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 93b3b6c14..3c12d2437 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5678,11 +5678,11 @@ const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc){ return lc->zrtp_secrets_cache; } -const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri) { +LinphoneCall* linphone_core_find_call_from_uri(const LinphoneCore *lc, const char *uri) { if (uri == NULL) return NULL; MSList *calls=lc->calls; while(calls) { - const LinphoneCall *c=(LinphoneCall*)calls->data; + LinphoneCall *c=(LinphoneCall*)calls->data; calls=calls->next; const LinphoneAddress *address = linphone_call_get_remote_address(c); char *current_uri=linphone_address_as_string_uri_only(address); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 50686a2c9..93ab0ca88 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -1460,7 +1460,7 @@ const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc); * @param uri which should match call remote uri * @return LinphoneCall or NULL is no match is found */ -const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri); +LinphoneCall* linphone_core_find_call_from_uri(const LinphoneCore *lc, const char *uri); int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call); int linphone_core_add_all_to_conference(LinphoneCore *lc); diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 2c37903b4..19e5ff43d 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -2281,7 +2281,7 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setZrtpSecretsCache(JNIE extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_findCallFromUri(JNIEnv *env,jobject thiz,jlong pCore, jstring jUri) { const char* cUri=env->GetStringUTFChars(jUri, NULL); - LinphoneCall *call= (LinphoneCall *) linphone_core_find_call_from_uri((LinphoneCore *) pCore,cUri); + LinphoneCall *call=linphone_core_find_call_from_uri((LinphoneCore *) pCore,cUri); env->ReleaseStringUTFChars(jUri, cUri); LinphoneCoreData *lcdata=(LinphoneCoreData*)linphone_core_get_user_data((LinphoneCore*)pCore); return (jobject) lcdata->getCall(env,call);