From beede6a18d5599d1bebcbae702df3478c9a3ce69 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 7 Feb 2013 18:45:46 +0100 Subject: [PATCH 1/5] fix bugs. --- coreapi/linphonecall.c | 1 + coreapi/linphonecore_jni.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 27354f61c..3b2054aeb 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -473,6 +473,7 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr linphone_call_init_common(call,from,to); _linphone_call_params_copy(&call->params,params); sal_op_set_custom_header(call->op,call->params.custom_headers); + call->params.custom_headers=NULL; if (linphone_core_get_firewall_policy(call->core) == LinphonePolicyUseIce) { call->ice_session = ice_session_new(); diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 3cbcf8f79..52a0dec7a 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1694,7 +1694,7 @@ extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_addCustomHeader(J const char *value=env->GetStringUTFChars(jheader_value,NULL); linphone_chat_message_add_custom_header((LinphoneChatMessage*)ptr,name,value); env->ReleaseStringUTFChars(jheader_name, name); - env->ReleaseStringUTFChars(jheader_name, name); + env->ReleaseStringUTFChars(jheader_value, value); } extern "C" jstring Java_org_linphone_core_LinphoneChatMessageImpl_getExternalBodyUrl(JNIEnv* env @@ -1876,7 +1876,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneCallParamsImpl_getCustomHeader return header_value ? env->NewStringUTF(header_value) : NULL; } -extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setCustomHeader(JNIEnv *env, jobject thiz, jlong lcp, jstring jheader_name, jstring jheader_value){ +extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_addCustomHeader(JNIEnv *env, jobject thiz, jlong lcp, jstring jheader_name, jstring jheader_value){ const char* header_name=env->GetStringUTFChars(jheader_name, NULL); const char* header_value=env->GetStringUTFChars(jheader_value, NULL); linphone_call_params_add_custom_header((LinphoneCallParams*)lcp,header_name,header_value); From b11e3b0a234f9da863dd63443e5d1a0bc2283a2d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 8 Feb 2013 11:01:26 +0100 Subject: [PATCH 2/5] fix compilation bug --- gtk/calllogs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/calllogs.c b/gtk/calllogs.c index 4a9330f4a..9e703a8ff 100644 --- a/gtk/calllogs.c +++ b/gtk/calllogs.c @@ -68,7 +68,7 @@ void linphone_gtk_call_log_update(GtkWidget *w){ g_date_time_unref(dt); } #else - start_date=g_strdup(ctime(start_date_time)); + start_date=g_strdup(ctime(&start_date_time)); #endif display=linphone_address_get_display_name (la); From c8e0246ccaae9f37d052bc8a4deab0a816f03a1a Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 8 Feb 2013 17:27:08 +0100 Subject: [PATCH 3/5] ICE was broken due to uPNP support, now ICE is back ! --- coreapi/linphonecall.c | 14 +++++++------- coreapi/linphonecore.c | 4 +++- mediastreamer2 | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 3b2054aeb..31b945acb 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -551,14 +551,14 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro break; case LinphonePolicyUseUpnp: #ifdef BUILD_UPNP - call->upnp_session = linphone_upnp_session_new(call); - if (call->upnp_session != NULL) { - linphone_call_init_media_streams(call); - if (linphone_core_update_upnp_from_remote_media_description(call, sal_call_get_remote_media_description(op))<0) { - /* uPnP port mappings failed, proceed with the call anyway. */ - linphone_call_delete_upnp_session(call); + call->upnp_session = linphone_upnp_session_new(call); + if (call->upnp_session != NULL) { + linphone_call_init_media_streams(call); + if (linphone_core_update_upnp_from_remote_media_description(call, sal_call_get_remote_media_description(op))<0) { + /* uPnP port mappings failed, proceed with the call anyway. */ + linphone_call_delete_upnp_session(call); + } } - } #endif //BUILD_UPNP break; default: diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 4c5822590..0db4090ca 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2082,7 +2082,7 @@ void linphone_core_iterate(LinphoneCore *lc){ linphone_core_start_invite() */ calls=calls->next; linphone_call_background_tasks(call,one_second_elapsed); - if (call->state==LinphoneCallOutgoingInit && (curtime-call->start_time>=2)){ + if (call->state==LinphoneCallOutgoingInit && (elapsed>=4)){ /*start the call even if the OPTIONS reply did not arrive*/ if (call->ice_session != NULL) { ms_warning("ICE candidates gathering from [%s] has not finished yet, proceed with the call without ICE anyway." @@ -2365,6 +2365,8 @@ int linphone_core_proceed_with_invite_if_ready(LinphoneCore *lc, LinphoneCall *c } else { upnp_ready = TRUE; } +#else + upnp_ready=TRUE; #endif //BUILD_UPNP if (call->ping_op != NULL) { if (call->ping_replied == TRUE) ping_ready = TRUE; diff --git a/mediastreamer2 b/mediastreamer2 index 6251dea54..13d3df5a9 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 6251dea54272cf048c580e03a80c67d672367f2a +Subproject commit 13d3df5a9333ce465214ede7afc9a535a43c9076 From 76dca7ce19c607f7e2013e08dc64747be7335b3b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 8 Feb 2013 17:30:55 +0100 Subject: [PATCH 4/5] add missing call log apis. --- coreapi/linphonecore.c | 11 +++++++++++ coreapi/linphonecore.h | 2 ++ mediastreamer2 | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 4c5822590..dd89175f7 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -270,6 +270,10 @@ const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog *cl) return &cl->remote_stats; } +const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl){ + return cl->call_id; +} + /** * Assign a user pointer to the call log. **/ @@ -326,6 +330,13 @@ LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl){ return cl->to; } +/** + * Returns remote address (that is from or to depending on call direction). +**/ +LinphoneAddress *linphone_call_log_get_remote_address(LinphoneCallLog *cl){ + return (cl->dir == LinphoneCallIncoming) ? cl->from : cl->to; +} + /** * Returns the direction of the call. **/ diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index f0b6f3d56..4d4a91988 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -160,6 +160,7 @@ typedef enum LinphoneMediaEncryption LinphoneMediaEncryption; /*public: */ LinphoneAddress *linphone_call_log_get_from(LinphoneCallLog *cl); LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl); +LinphoneAddress *linphone_call_log_get_remote_address(LinphoneCallLog *cl); LinphoneCallDir linphone_call_log_get_dir(LinphoneCallLog *cl); LinphoneCallStatus linphone_call_log_get_status(LinphoneCallLog *cl); time_t linphone_call_log_get_start_date(LinphoneCallLog *cl); @@ -171,6 +172,7 @@ void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey); const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl); const rtp_stats_t *linphone_call_log_get_local_stats(const LinphoneCallLog *cl); const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog *cl); +const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl); char * linphone_call_log_to_str(LinphoneCallLog *cl); struct _LinphoneCallParams; diff --git a/mediastreamer2 b/mediastreamer2 index 6251dea54..13d3df5a9 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 6251dea54272cf048c580e03a80c67d672367f2a +Subproject commit 13d3df5a9333ce465214ede7afc9a535a43c9076 From 47a02f34fdfaf89e5c73aa387a639234c7ffa8bc Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 11 Feb 2013 12:11:50 +0100 Subject: [PATCH 5/5] Update ms2 submodule for android sound module fix on tablets. --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 13d3df5a9..63aef125c 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 13d3df5a9333ce465214ede7afc9a535a43c9076 +Subproject commit 63aef125c633be420f4a162b2e7526339674f4a2