From 1cf68854463d49217ce5aa38bc50f7e6acfd96f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Thu, 6 Apr 2017 17:34:22 +0200 Subject: [PATCH 1/5] Disable the compilation of lp-gen-wrapper with autotools --- tools/Makefile.am | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index afcc52cdb..2531b7b3a 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -20,7 +20,7 @@ EXTRA_DIST=xml2lpc_jni.cc lpc2xml_jni.cc if BUILD_TOOLS -bin_PROGRAMS=xml2lpc_test lpc2xml_test lp-gen-wrappers lp-autoanswer lp-test-ecc lp-sendmsg +bin_PROGRAMS=xml2lpc_test lpc2xml_test lp-autoanswer lp-test-ecc lp-sendmsg xml2lpc_test_SOURCES=\ xml2lpc_test.c @@ -36,13 +36,6 @@ lpc2xml_test_CFLAGS=$(COMMON_CFLAGS) lpc2xml_test_LDADD=\ $(top_builddir)/coreapi/liblinphone.la -lp_gen_wrappers_SOURCES=genwrappers.cc \ - software-desc.cc software-desc.hh \ - generator.cc generator.hh - -lp_gen_wrappers_LDADD= \ - $(LIBXML2_LIBS) - lp_autoanswer_SOURCES=auto_answer.c lp_autoanswer_CFLAGS=$(COMMON_CFLAGS) lp_autoanswer_LDADD=\ From cb4fcaeb312d592405b725327639c8c6cba4050d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Fri, 7 Apr 2017 09:08:06 +0200 Subject: [PATCH 2/5] Remove lp-gen-wrapper from the RPM spec file --- linphone.spec.in | 1 - 1 file changed, 1 deletion(-) diff --git a/linphone.spec.in b/linphone.spec.in index d0a721233..2bd2843d8 100644 --- a/linphone.spec.in +++ b/linphone.spec.in @@ -101,7 +101,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_bindir}/lpc2xml_test %{_bindir}/xml2lpc_test -%{_bindir}/lp-gen-wrappers %{_bindir}/lp-sendmsg %{_includedir}/linphone %{_libdir}/*.a From 3bd323bec3535cb599d523096b49dced43f16308 Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Fri, 7 Apr 2017 10:48:56 +0200 Subject: [PATCH 3/5] [JNI] remove listener unregistration on LinphoneMessageState = NotDelivered --- coreapi/linphonecore_jni.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 9a40acbc7..99141e869 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -4575,7 +4575,7 @@ extern "C" jboolean Java_org_linphone_core_LinphoneChatMessageImpl_isSecured(JNI return linphone_chat_message_is_secured((LinphoneChatMessage*)ptr); } -extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_resend(JNIEnv* env +extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_reSend(JNIEnv* env ,jobject thiz ,jlong ptr) { linphone_chat_message_resend((LinphoneChatMessage*)ptr); @@ -4605,7 +4605,7 @@ static void message_state_changed(LinphoneChatMessage* msg, LinphoneChatMessageS LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc); env->CallVoidMethod(listener, method, jmessage, env->CallStaticObjectMethod(ljb->chatMessageStateClass, ljb->chatMessageStateFromIntId, (jint)state)); - if (state == LinphoneChatMessageStateDisplayed || state == LinphoneChatMessageStateNotDelivered) { + if (state == LinphoneChatMessageStateDisplayed) { env->DeleteGlobalRef(listener); msg->message_state_changed_user_data = NULL; } @@ -4768,7 +4768,7 @@ static void chat_room_impl_callback(LinphoneChatMessage* msg, LinphoneChatMessag jmessage, env->CallStaticObjectMethod(ljb->chatMessageStateClass,ljb->chatMessageStateFromIntId,(jint)state)); - if (state == LinphoneChatMessageStateDisplayed || state == LinphoneChatMessageStateNotDelivered) { + if (state == LinphoneChatMessageStateDisplayed ) { env->DeleteGlobalRef(listener); env->DeleteGlobalRef(jmessage); linphone_chat_message_set_user_data(msg,NULL); From bfcda8ef5dae3297ed13e6485f6a85fff3e89a46 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 7 Apr 2017 14:20:16 +0200 Subject: [PATCH 4/5] Fix build on Windows. --- coreapi/payload_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/payload_type.c b/coreapi/payload_type.c index 3584b49c3..e53d0739f 100644 --- a/coreapi/payload_type.c +++ b/coreapi/payload_type.c @@ -29,7 +29,7 @@ struct _LinphonePayloadType { }; BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphonePayloadType); -BELLE_SIP_DECLARE_VPTR(LinphonePayloadType); +BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphonePayloadType); LinphonePayloadType *linphone_payload_type_new(LinphoneCore *lc, OrtpPayloadType *ortp_pt) { LinphonePayloadType *pt; From cc08579621677e9b4403529656cf2e90d43db961 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 7 Apr 2017 14:58:26 +0200 Subject: [PATCH 5/5] avoid strcpy() --- coreapi/bellesip_sal/sal_op_call.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/coreapi/bellesip_sal/sal_op_call.c b/coreapi/bellesip_sal/sal_op_call.c index 86c5460ee..9676c9b73 100644 --- a/coreapi/bellesip_sal/sal_op_call.c +++ b/coreapi/bellesip_sal/sal_op_call.c @@ -37,11 +37,11 @@ static void call_set_error(SalOp* op,belle_sip_response_t* response, bool_t fata if (fatal) op->state = SalOpStateTerminating; op->base.root->callbacks.call_failure(op); } -static void set_addr_to_0000(char value[]) { +static void set_addr_to_0000(char value[], size_t sz) { if (ms_is_ipv6(value)) { - strcpy(value,"::0"); + strncpy(value,"::0", sz); } else { - strcpy(value,"0.0.0.0"); + strncpy(value,"0.0.0.0", sz); } return; } @@ -66,11 +66,11 @@ static void sdp_process(SalOp *h){ offer_answer_initiate_incoming(h->base.root->factory, h->base.local_media,h->base.remote_media,h->result,h->base.root->one_matching_codec); /*for backward compatibility purpose*/ if(h->cnx_ip_to_0000_if_sendonly_enabled && sal_media_description_has_dir(h->result,SalStreamSendOnly)) { - set_addr_to_0000(h->result->addr); + set_addr_to_0000(h->result->addr, sizeof(h->result->addr)); for(i=0;iresult->streams[i].dir == SalStreamSendOnly) { - set_addr_to_0000(h->result->streams[i].rtp_addr); - set_addr_to_0000(h->result->streams[i].rtcp_addr); + set_addr_to_0000(h->result->streams[i].rtp_addr, sizeof(h->result->streams[i].rtp_addr)); + set_addr_to_0000(h->result->streams[i].rtcp_addr, sizeof(h->result->streams[i].rtcp_addr)); } } }