From 33036fdedd17b0a25b384ec77f44666243f8ed3a Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Fri, 28 Jun 2013 10:04:55 +0200 Subject: [PATCH 01/13] update README --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index a1fb5bd3d..c4a559418 100644 --- a/README +++ b/README @@ -33,10 +33,10 @@ This is Linphone, a free (GPL) video softphone based on the SIP protocol. Here is the command line to get these dependencies installed for Ubuntu && Debian - $ sudo apt-get install libtool intltool libgtk2.0-dev libosip2-dev libexosip2-dev libspeexdsp-dev libavcodec-dev libswscale-dev libx11-dev libvx-dev ligl1-mesa-dev libglew-dev libv4l-dev + $ sudo apt-get install libtool intltool libgtk2.0-dev libosip2-dev libexosip2-dev libspeexdsp-dev libavcodec-dev libswscale-dev libx11-dev libvxl1-dev libgl1-mesa-dev libglew1.6-dev libv4l-dev + for optional library - $ sudo apt-get install libreadline-dev liggsm1-dev libtheora-dev libsoup2.4-dev libsqlit3-dev libupnp6-dev + $ sudo apt-get install libreadline-dev libgsm1-dev libtheora-dev libsoup2.4-dev libsqlite3-dev libupnp4-dev + Install srtp (optional) for call encryption : $ git clone git://git.linphone.org/srtp.git From 28cbd15c67f67880a10d2f5292301aeaebe918f6 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Mon, 1 Jul 2013 11:26:48 +0200 Subject: [PATCH 02/13] Improve configure scripts (test xxd, force broken srtp). --- mediastreamer2 | 2 +- oRTP | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index 4ccd8ca51..0c0a3a36d 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 4ccd8ca511eb46375699f5efaf8f41b655e0dbb8 +Subproject commit 0c0a3a36d2352d53053ab8b9255b48b6b05843ae diff --git a/oRTP b/oRTP index 020d921f8..49b16793b 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 020d921f876ed04d434425fb2176642bbe9b3004 +Subproject commit 49b16793b9ef8251a4c42434b57387c6e3c6d251 From 5b8cb6465098730f0de1910e3f009b798d4ff941 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 2 Jul 2013 13:18:13 +0200 Subject: [PATCH 03/13] Regular expression on domain in the account assistant was too strict. --- gtk/setupwizard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/setupwizard.c b/gtk/setupwizard.c index f4374c539..0c15e602b 100644 --- a/gtk/setupwizard.c +++ b/gtk/setupwizard.c @@ -60,7 +60,7 @@ static int all_account_information_entered(GtkWidget *w) { if (gtk_entry_get_text_length(username) > 0 && gtk_entry_get_text_length(domain) > 0 && g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$", gtk_entry_get_text(username), 0, 0) && - g_regex_match_simple("^(sip:)?([a-z0-9]+([\\.-][a-z0-9]+)*)+\\.[a-z]{2,}$", gtk_entry_get_text(domain), 0, 0)) { + g_regex_match_simple("^(sip:)?([a-zA-Z0-9]+([\\.-][a-zA-Z0-9]+)*)$", gtk_entry_get_text(domain), 0, 0)) { return 1; } return 0; From 26c21451b9a01bc535aa4f556723e3bc573333e4 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 2 Jul 2013 13:18:57 +0200 Subject: [PATCH 04/13] Secure code and fix memory leak. --- gtk/setupwizard.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/setupwizard.c b/gtk/setupwizard.c index 0c15e602b..439f9c89f 100644 --- a/gtk/setupwizard.c +++ b/gtk/setupwizard.c @@ -422,11 +422,17 @@ static void linphone_gtk_assistant_prepare(GtkWidget *assistant, GtkWidget *page gchar *username = creator->username + 4; const gchar *needle = "@"; - username = g_strndup(username, (g_strrstr(username, needle) - username)); + const gchar *needle_ptr = g_strrstr(username, needle); + if (needle_ptr != NULL) { + username = g_strndup(username, needle_ptr - username); + } else { + username = g_strdup(username); + } gchar domain[128]; g_snprintf(domain, sizeof(domain), "\"%s\"", creator->domain + 4); LinphoneAuthInfo *info=linphone_auth_info_new(username, username, creator->password, NULL, domain); linphone_core_add_auth_info(linphone_gtk_get_core(),info); + g_free(username); if (linphone_core_add_proxy_config(linphone_gtk_get_core(),cfg)==-1) return; From 6528037a75bf8f50da3bd7afe4d541dc7623d3b0 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 2 Jul 2013 14:58:58 +0200 Subject: [PATCH 05/13] Update gen-gtkfilelist.sh script. --- gen-gtkfilelist.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gen-gtkfilelist.sh b/gen-gtkfilelist.sh index 4036201ba..15a5b8812 100755 --- a/gen-gtkfilelist.sh +++ b/gen-gtkfilelist.sh @@ -7,17 +7,24 @@ echo bin find bin -name *.dll find lib/gtk-2.0 find etc -find share/locale/fr -find share/locale/de -find share/locale/sv find share/locale/cs +find share/locale/de find share/locale/es +find share/locale/fr +find share/locale/he find share/locale/hu find share/locale/it find share/locale/ja +find share/locale/nb +find share/locale/nb_NO find share/locale/nl find share/locale/pl -find share/locale/ru +find share/locale/pt find share/locale/pt_BR +find share/locale/ru +find share/locale/sr +find share/locale/sv +find share/locale/zh +find share/locale/zh_CN +find share/locale/zh_TW find share/themes - From 4218b92e0ac7ef16567ca20dfdf5ede0383c44e8 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 2 Jul 2013 16:47:28 +0200 Subject: [PATCH 06/13] Fix preview window global refs on Android. --- coreapi/linphonecore_jni.cc | 12 ++++++------ mediastreamer2 | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 1dfaf3c3c..2c37903b4 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1932,13 +1932,13 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoWindowId(JNIEnv* ,jlong lc ,jobject obj) { jobject oldWindow = (jobject) linphone_core_get_native_video_window_id((LinphoneCore*)lc); - if (oldWindow != NULL) { - env->DeleteGlobalRef(oldWindow); - } if (obj != NULL) { obj = env->NewGlobalRef(obj); } linphone_core_set_native_video_window_id((LinphoneCore*)lc,(unsigned long)obj); + if (oldWindow != NULL) { + env->DeleteGlobalRef(oldWindow); + } } extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPreviewWindowId(JNIEnv* env @@ -1946,13 +1946,13 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPreviewWindowId(JNIEn ,jlong lc ,jobject obj) { jobject oldWindow = (jobject) linphone_core_get_native_preview_window_id((LinphoneCore*)lc); - if (oldWindow != NULL) { - env->DeleteGlobalRef(oldWindow); - } if (obj != NULL) { obj = env->NewGlobalRef(obj); } linphone_core_set_native_preview_window_id((LinphoneCore*)lc,(unsigned long)obj); + if (oldWindow != NULL) { + env->DeleteGlobalRef(oldWindow); + } } extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDeviceRotation(JNIEnv* env diff --git a/mediastreamer2 b/mediastreamer2 index 0c0a3a36d..cab341d59 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 0c0a3a36d2352d53053ab8b9255b48b6b05843ae +Subproject commit cab341d59bc4d37f82ddccbfcf1ae2563f9c5028 From 5dbfc1d3e1426b6f805f890c850df73ed97381ad Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 2 Jul 2013 16:48:08 +0200 Subject: [PATCH 07/13] Allow updating camera parameters with linphone_core_update_call() in the StreamsRunning state only. --- coreapi/linphonecore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 34c849595..cffb6b6bb 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2903,7 +2903,7 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho err = linphone_core_start_update_call(lc, call); }else{ #ifdef VIDEO_ENABLED - if (call->videostream!=NULL){ + if ((call->videostream != NULL) && (call->state == LinphoneCallStreamsRunning)) { video_stream_set_sent_video_size(call->videostream,linphone_core_get_preferred_video_size(lc)); if (call->camera_active && call->videostream->cam!=lc->video_conf.device){ video_stream_change_camera(call->videostream,lc->video_conf.device); From 5b0986b0bea918d12f1a7c5b052423133ab993b6 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 9 Jul 2013 09:53:57 +0200 Subject: [PATCH 08/13] Update ms2 (msoxdisplay fix) --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index cab341d59..36f18a7c8 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit cab341d59bc4d37f82ddccbfcf1ae2563f9c5028 +Subproject commit 36f18a7c86a9fe7e81eeef1e361ac5a99d3e8c39 From 4905f373441bc35f7e9b43b748612b1190a57b00 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 9 Jul 2013 10:53:39 +0200 Subject: [PATCH 09/13] Disable selfview before destroying core --- coreapi/linphonecore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index cffb6b6bb..76ce57b88 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5276,6 +5276,8 @@ LpConfig *linphone_core_get_config(LinphoneCore *lc){ static void linphone_core_uninit(LinphoneCore *lc) { linphone_core_free_hooks(lc); + lc->video_conf.show_local = false; + while(lc->calls) { LinphoneCall *the_call = lc->calls->data; From 36c4b1523df6d9e14431a26da2c84fc257be1a71 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 9 Jul 2013 11:03:20 +0200 Subject: [PATCH 10/13] Fix previous commit false => FALSE --- coreapi/linphonecore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 76ce57b88..93b3b6c14 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5276,7 +5276,7 @@ LpConfig *linphone_core_get_config(LinphoneCore *lc){ static void linphone_core_uninit(LinphoneCore *lc) { linphone_core_free_hooks(lc); - lc->video_conf.show_local = false; + lc->video_conf.show_local = FALSE; while(lc->calls) { From 22a969a07298fb0166872fa68b9b60204413aff1 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 9 Jul 2013 12:15:29 +0200 Subject: [PATCH 11/13] Update ms2 (auto-creation of video view) --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 36f18a7c8..c2fd01b76 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 36f18a7c86a9fe7e81eeef1e361ac5a99d3e8c39 +Subproject commit c2fd01b765ceefb333865b645e73873c4ef7c902 From 2372467ac6a30d1e1a4355679b7ba4476bce65dc Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 10 Jul 2013 10:28:57 +0200 Subject: [PATCH 12/13] Update ms2 submodule. --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index c2fd01b76..aebfe443e 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit c2fd01b765ceefb333865b645e73873c4ef7c902 +Subproject commit aebfe443e91aa1e1c1e32b2410cc1d9a5db629c1 From ca5128238b4541dfb2bd56d2dec47f9427006e48 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 11 Jul 2013 11:50:47 +0200 Subject: [PATCH 13/13] 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);