Merge tag '3.11.0'

3.11.0
This commit is contained in:
François Grisez 2017-02-24 16:38:36 +01:00
commit 17df3b86a5
15 changed files with 212 additions and 159 deletions

View file

@ -21,7 +21,7 @@
############################################################################
cmake_minimum_required(VERSION 3.0)
project(linphone VERSION 3.10.2 LANGUAGES C CXX)
project(linphone VERSION 3.11.0 LANGUAGES C CXX)
set(LINPHONE_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
@ -54,7 +54,6 @@ option(ENABLE_TOOLS "Turn on or off compilation of tools." YES)
option(ENABLE_TUNNEL "Turn on compilation of tunnel support." NO)
option(ENABLE_TUTORIALS "Enable compilation of tutorials." YES)
option(ENABLE_UNIT_TESTS "Enable compilation of unit tests." YES)
option(ENABLE_UPNP "Build with uPnP support." YES)
option(ENABLE_VIDEO "Build with video support." YES)
cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENABLE_GTK_UI" NO)
option(ENABLE_DEBUG_LOGS "Turn on or off debug level logs." NO)

View file

@ -49,41 +49,42 @@ ISCC=ISCC.exe
PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist
PACKAGE_BUNDLE_FILE=$(top_srcdir)/build/macos/$(PACKAGE).bundle
EXTRA_DIST = BUGS \
README.arm \
README.mingw \
README.macos.md \
autogen.sh \
linphone.spec \
linphone.spec.in \
$(GTK_FILELIST) \
gen-gtkfilelist.sh \
$(LINPHONEDEPS_FILELIST) \
$(ISS_SCRIPT).in
EXTRA_DIST += CMakeLists.txt \
cmake/FindGtkMacIntegration.cmake \
cmake/FindIconv.cmake \
cmake/FindIntl.cmake \
cmake/FindNotify.cmake \
cmake/FindSqlite3.cmake \
cmake/FindXML2.cmake \
cmake/FindZlib.cmake \
cmake/LinphoneConfig.cmake.in \
config.h.cmake \
console/CMakeLists.txt \
coreapi/CMakeLists.txt \
coreapi/gitversion.cmake \
coreapi/help/CMakeLists.txt \
gtk/CMakeLists.txt \
java/CMakeLists.txt \
pixmaps/CMakeLists.txt \
po/CMakeLists.txt \
share/CMakeLists.txt \
share/rings/CMakeLists.txt \
share/rootca.cmake \
tester/CMakeLists.txt \
tools/CMakeLists.txt
EXTRA_DIST = \
BUGS \
README.arm \
README.mingw \
README.macos.md \
README.md \
autogen.sh \
linphone.spec \
linphone.spec.in \
$(GTK_FILELIST) \
gen-gtkfilelist.sh \
$(LINPHONEDEPS_FILELIST) \
$(ISS_SCRIPT).in \
CMakeLists.txt \
cmake/FindGtkMacIntegration.cmake \
cmake/FindIconv.cmake \
cmake/FindIntl.cmake \
cmake/FindNotify.cmake \
cmake/FindSqlite3.cmake \
cmake/FindXML2.cmake \
cmake/FindZlib.cmake \
cmake/LinphoneConfig.cmake.in \
config.h.cmake \
console/CMakeLists.txt \
coreapi/CMakeLists.txt \
coreapi/gitversion.cmake \
coreapi/help/CMakeLists.txt \
gtk/CMakeLists.txt \
java/CMakeLists.txt \
pixmaps/CMakeLists.txt \
po/CMakeLists.txt \
share/CMakeLists.txt \
share/rings/CMakeLists.txt \
share/rootca.cmake \
tester/CMakeLists.txt \
tools/CMakeLists.txt
DISTCLEANFILES= $(ISS_SCRIPT) $(PACKAGE_WIN32_FILELIST)

12
NEWS
View file

@ -1,7 +1,17 @@
linphone-3.11.0 -- February 24th, 2017
* Security vulnerability fix concering TLS. The common name of certificats
delivered by SIP proxies were not compared with their hostname.
* Improvement of H.264 hardware encoder/decoder on MacOSX.
* Fix a bug in P2P presence system. Unchecking `Allow this contact to see my presence` checkbox
in contact editing view had no any effect. Then it was not possible to hide presence informations to
a contact once it had been allowed to see it.
* Performance improvments of the presence list feature.
* IM Encription Engine: abstraction for messaging encription protocols.
linphone-3.10.2 -- August 30th, 2016
* Fixing linphone python version compilation - fixing vcards
inphone-3.10.0 -- August 8th, 2016
linphone-3.10.0 -- August 8th, 2016
* Adding lime_experimental_feature : set to 1 in .linphonerc [GtkUi] to
show the Lime menu in the graphical user interface. Caution : Experimental.
* Video conference support through a conference server (SDK only)

91
README
View file

@ -1,91 +0,0 @@
This is Linphone, a free (GPL) video softphone based on the SIP protocol.
# Warning
Unless you exactly know what you are doing, you should take at look at [linphone-desktop](https://github.com/BelledonneCommunications/linphone-desktop).
# Otherwise…
## Building Linphone
- Install build time dependencies
- libtool
- intltool
- you need at least:
- belle-sip>=1.3.0
- speex>=1.2.0 (including libspeexdsp part)
- libxml2
- bctoolbox
+ if you want the gtk/glade interface:
- libgtk >=2.16.0
+ if you want video support:
- libvpx (VP8 codec)
- libavcodec (ffmpeg)
- libswscale (part of ffmpeg too) for better scaling performance
- libxv (x11 video extension)
- libgl1-mesa (OpenGL API -- GLX development files)
- libglew (OpenGL Extension Wrangler library)
- libv4l (Video for linux)
- libx11 (x11)
- theora (optional)
+ gsm codec (gsm source package or libgsm-dev or gsm-devel) (optional)
+ libreadline (optional: for convenient command line in linphonec)
+ libsqlite3 (optional : for a local history of chat messages)
+ if you want uPnP support (optional):
- libupnp (version 1.6 branch (not patched with 18-url-upnpstrings.patch))
Here is the command line to get these dependencies installed for Ubuntu && Debian
$ sudo apt-get install libtool intltool libgtk2.0-dev libspeexdsp-dev \
libavcodec-dev libswscale-dev libx11-dev libxv-dev libgl1-mesa-dev \
libglew1.6-dev libv4l-dev libxml2-dev
+ for optional library
$ sudo apt-get install libreadline-dev libgsm1-dev libtheora-dev \
libsqlite3-dev libupnp4-dev libsrtp-dev
+ Install zrtp (optional), for unbreakable call encryption
$ git clone git://git.linphone.org/bzrtp.git
$ cd bzrtp && ./autogen.sh && ./configure && make
$ sudo make install
- Compile linphone
$ ./autogen.sh
$ ./configure
$ make && sudo make install
$ sudo ldconfig
For windows compilation see README.mingw.
For macOS X, see README.macos
## Notes for developers
Here is a short description of the content of the source tree.
- oRTP/ is a poweful implementation of the RTP protocol. See the oRTP/README for more details.
It is used by mediastreamer2 to send and receive streams to the network.
- mediastreamer2/ is one of the important part of linphone. It is a framework for audio
and video processing. It contains several objects for grabing audio and video and outputing
it (through rtp, to file).
It contains also codec objects to compress audio and video streams.
The mediastream.h files contain routines to easyly setup audio streams.
- coreapi/ is the central point of linphone, which handles relationship between sip signalisation and media
streaming. It contains an easy to use api to create a sip phone.
- gtk/ is the directory that contains the gui frontend of linphone. It uses all libraries descibed above.
- console/
* linphonec.c is the main file for the console version of linphone.
* sipomatic.c / sipomatic.h contains the code for sipomatic, the test program that auto-answer to linphone calls.
* shell.c (program name: linphonecsh) is a small utilities to send interactive commands to a running linphonec daemon.
- share/ contains translation, documentation, rings and hello sound files.

97
README.md Normal file
View file

@ -0,0 +1,97 @@
Linphone
========
This is Linphone, a free (GPL) video softphone based on the SIP protocol.
**WARNING:** Unless you exactly know what you are doing, you should take at look at *linphone-desktop[1]*.
Building Linphone
-----------------
### Required dependencies
* *BcToolbox[2]*: portability layer
* *BelleSIP[3]*: SIP stack
* *Mediastreamer2[4]*: multimedia engine
* libxml2
* zlib
* libsqlite3: user data storage (disablable)
* libnotify: system notification (GNU/Linux only;disablable)
* libgtk2: graphical interface (disablable)
* gettext and libintl: internationalization support (disablable)
### Opitonal dependencies
* *Belcard[5]*: VCard support
* gtkmacintegration: integration with MacOSX menu
### Build instructions
cmake . -DCMAKE_INSTALL_PREFIX=<prefix> -DCMAKE_PREFIX_PATH=<search_prefixes>
make
make install
### Supported build opitons
* `CMAKE_INSTALL_PREFIX=<string>` : install prefix
* `CMAKE_PREFIX_PATH=<string>` : column-separated list of prefixes where to search for dependencies
* `ENABLE_SHARED=NO` : do not build the shared library
* `ENABLE_STATIC=NO` : do not build the static library
* `ENABLE_STRICT=NO` : build without strict compilation flags (-Wall -Werror)
* `ENABLE_DOC=NO` : do not generate the reference documentation of liblinphone
* `ENABLE_GTK_UI=NO` : do not build the GTK user interface
* `ENABLE_UNIT_TESTS=NO` : do not build testing binaries
* `ENABLE_VCARD=NO` : disable VCard support
* `ENABLE_SQLITE_STORAGE=NO` : disable SQlite user data storage (message, history, contacts list)
* `ENABLE_TOOLS=NO` : do not build tool binaries
* `ENABLE_NLS=NO` : disable internationalization
* `ENABLE_ASSISTANT=NO` : disable account creation wizard
### Note for packagers
Our CMake scripts may automatically add some paths into research paths of generated binaries.
To ensure that the installed binaries are striped of any rpath, use `-DCMAKE_SKIP_INSTALL_RPATH=ON`
while you invoke cmake.
Notes for developers
--------------------
Here is a short description of the content of the source tree.
- **oRTP/** is a poweful implementation of the RTP protocol. See the oRTP/README for more details.
It is used by mediastreamer2 to send and receive streams to the network.
- **mediastreamer2/** is one of the important part of linphone. It is a framework for audio
and video processing. It contains several objects for grabing audio and video and outputing
it (through rtp, to file).
It contains also codec objects to compress audio and video streams.
The mediastream.h files contain routines to easyly setup audio streams.
- **coreapi/** is the central point of linphone, which handles relationship between sip signalisation and media
streaming. It contains an easy to use api to create a sip phone.
- **gtk/** is the directory that contains the gui frontend of linphone. It uses all libraries descibed above.
- **console/**
* linphonec.c is the main file for the console version of linphone.
* sipomatic.c / sipomatic.h contains the code for sipomatic, the test program that auto-answer to linphone calls.
* shell.c (program name: linphonecsh) is a small utilities to send interactive commands to a running linphonec daemon.
- **share/** contains translation, documentation, rings and hello sound files.
------------------------------
- [1] linphone-desktop: git://git.linphone.org/linphone-desktop.git
- [2] bctoolbox: git://git.linphone.org/bctoolbox.git *or* <https://www.linphone.org/releases/sources/bctoolbox>
- [3] belle-sip: git://git.linphone.org/belle-sip.git *or* <https://www.linphone.org/releases/sources/belle-sip>
- [4] mediastreamer2: git://git.linphone.org/mediastreamer2.git *or* <https://www.linphone.org/releases/sources/mediastreamer>
- [5] belcard: git://git.linphone.org/belcard.git *or* <https://www.linphone.org/releases/sources/belcard>

View file

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT([linphone],[3.10.2],[linphone-developers@nongnu.org])
AC_INIT([linphone],[3.11.0],[linphone-developers@nongnu.org])
AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([coreapi/linphonecore.c])
@ -30,7 +30,7 @@ AC_SUBST(LINPHONE_VERSION)
AC_MSG_NOTICE([$PACKAGE_NAME-$PACKAGE_VERSION A full featured audio/video sip phone.])
AC_MSG_NOTICE([licensed under the terms of the General Public License (GPL)])
AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects])
AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects foreign])
AC_SUBST([LIBTOOL_DEPS])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
AC_SUBST([docdir], [${datadir}/doc])

View file

@ -514,12 +514,16 @@ void linphone_friend_invalidate_subscription(LinphoneFriend *lf){
lf->initial_subscribes_sent=FALSE;
}
void linphone_friend_close_subscriptions(LinphoneFriend *lf){
linphone_friend_unsubscribe(lf);
static void linphone_friend_close_incoming_subscriptions(LinphoneFriend *lf) {
bctbx_list_for_each(lf->insubs, (MSIterateFunc) sal_notify_presence_close);
lf->insubs = bctbx_list_free_with_data(lf->insubs, (MSIterateFunc)sal_op_release);
}
void linphone_friend_close_subscriptions(LinphoneFriend *lf){
linphone_friend_unsubscribe(lf);
linphone_friend_close_incoming_subscriptions(lf);
}
static void _linphone_friend_release_ops(LinphoneFriend *lf){
lf->insubs = bctbx_list_free_with_data(lf->insubs, (MSIterateFunc) sal_op_release);
if (lf->outsub){
@ -794,6 +798,10 @@ void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc) {
}
fr->inc_subscribe_pending = FALSE;
}
if (fr->pol == LinphoneSPDeny && fr->insubs) {
linphone_friend_close_incoming_subscriptions(fr);
}
linphone_friend_update_subscribes(fr, linphone_core_should_subscribe_friends_only_when_registered(lc));

View file

@ -1156,11 +1156,11 @@ static void sip_config_read(LinphoneCore *lc) {
if (tmpstr==NULL || linphone_core_set_primary_contact(lc,tmpstr)==-1) {
const char *hostname=NULL;
const char *username=NULL;
#ifdef HAVE_GETENV
#if !defined(LINPHONE_WINDOWS_UNIVERSAL) && !defined(LINPHONE_WINDOWS_PHONE) // Using getenv is forbidden on Windows 10 and Windows Phone
hostname=getenv("HOST");
username=getenv("USER");
if (hostname==NULL) hostname=getenv("HOSTNAME");
#endif /*HAVE_GETENV*/
#endif
if (hostname==NULL)
hostname="unknown-host";
if (username==NULL){
@ -1569,7 +1569,7 @@ static void video_config_read(LinphoneCore *lc){
linphone_core_set_video_device(lc,str);
linphone_core_set_preferred_video_size_by_name(lc,
lp_config_get_string(lc->config,"video","size","cif"));
lp_config_get_string(lc->config,"video","size","vga"));
linphone_core_set_preview_video_size_by_name(lc,
lp_config_get_string(lc->config,"video","preview_size",NULL));

View file

@ -1551,12 +1551,17 @@ void linphone_subscription_new(LinphoneCore *lc, SalOp *op, const char *from){
/* check if we answer to this subscription */
lf = linphone_core_find_friend(lc, uri);
if (lf!=NULL){
linphone_friend_add_incoming_subscription(lf, op);
lf->inc_subscribe_pending=TRUE;
if (lp_config_get_int(lc->config,"sip","notify_pending_state",0)) {
sal_notify_pending_state(op);
if (lf->pol != LinphoneSPDeny) {
linphone_friend_add_incoming_subscription(lf, op);
lf->inc_subscribe_pending=TRUE;
if (lp_config_get_int(lc->config,"sip","notify_pending_state",0)) {
sal_notify_pending_state(op);
}
sal_subscribe_accept(op);
} else {
ms_message("%s is not authorized to subscribe", from);
sal_subscribe_decline(op, SalReasonDeclined);
}
sal_subscribe_accept(op);
linphone_friend_done(lf); /*this will do all necessary actions */
}else{
/* check if this subscriber is in our black list */

View file

@ -160,6 +160,7 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from,
const GRegex *uri_regex = get_uri_regex();
GMatchInfo *match_info = NULL;
const char *message = linphone_chat_message_get_text(msg);
const char *external_body_url = linphone_chat_message_get_external_body_url(msg);
time_t t;
char buf[80];
time_t tnow;
@ -180,10 +181,7 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from,
}
ms_free(from_str);
if (!message) {
const char *external_body_url = linphone_chat_message_get_external_body_url(msg);
if (external_body_url) message = external_body_url;
}
if (external_body_url) message = external_body_url;
// Inserts message body and tags URIs as hypertext links
if(message) {

View file

@ -1014,7 +1014,7 @@ void linphone_gtk_record_call_toggled(GtkWidget *button){
linphone_core_stop_conference_recording(lc);
}
gtk_label_set_markup(GTK_LABEL(label),message);
gtk_label_set_markup(GTK_LABEL(label),g_locale_to_utf8(message, -1, NULL, NULL, NULL));
g_free(message);
}

View file

@ -257,6 +257,8 @@ static void linphone_gtk_init_liblinphone(const char *config_file,
LinphoneCoreVTable vtable={0};
gchar *secrets_file=linphone_gtk_get_config_file(SECRETS_FILE);
gchar *user_certificates_dir=linphone_gtk_get_config_file(CERTIFICATES_PATH);
MSFactory *msfactory = NULL;
MSFilterDesc *ogl_filter_desc;
vtable.global_state_changed=linphone_gtk_global_state_changed;
vtable.call_state_changed=linphone_gtk_call_state_changed;
@ -301,6 +303,11 @@ static void linphone_gtk_init_liblinphone(const char *config_file,
if (chat_messages_db_file) linphone_core_set_chat_database_path(the_core,chat_messages_db_file);
if (call_logs_db_file) linphone_core_set_call_logs_database_path(the_core, call_logs_db_file);
if (friends_db_file) linphone_core_set_friends_database_path(the_core, friends_db_file);
// Disable the generic OpenGL displaying filter
msfactory = linphone_core_get_ms_factory(the_core);
ogl_filter_desc = ms_factory_lookup_filter_by_id(msfactory, MS_OGL_ID);
if (ogl_filter_desc != NULL) ogl_filter_desc->flags &= ~MS_FILTER_IS_ENABLED;
}
LinphoneCore *linphone_gtk_get_core(void){
@ -844,6 +851,7 @@ gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_
const char **fmts=linphone_core_get_supported_file_formats(linphone_gtk_get_core());
int i;
const char *ext="wav";
char *record_path_utf8, *record_path;
#ifdef _WIN32
loctime=*localtime(&curtime);
@ -876,7 +884,10 @@ gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_
if (!dir) {
ms_message ("No directory for music, using [%s] instead",dir=getenv("HOME"));
}
return g_build_filename(dir,filename,NULL);
record_path_utf8 = g_build_filename(dir,filename,NULL);
record_path = g_locale_from_utf8(record_path_utf8, -1, NULL, NULL, NULL);
g_free(record_path_utf8);
return record_path;
}
gchar *linphone_gtk_get_snapshot_path(void) {
@ -886,6 +897,7 @@ gchar *linphone_gtk_get_snapshot_path(void) {
time_t curtime=time(NULL);
struct tm loctime;
const char *ext="jpg";
char *snapshot_path_utf8, *snapshot_path;
#ifdef _WIN32
loctime=*localtime(&curtime);
@ -899,7 +911,10 @@ gchar *linphone_gtk_get_snapshot_path(void) {
if (!dir) {
ms_message ("No directory for pictures, using [%s] instead",dir=getenv("HOME"));
}
return g_build_filename(dir,filename,NULL);
snapshot_path_utf8 = g_build_filename(dir,filename,NULL);
snapshot_path = g_locale_from_utf8(snapshot_path_utf8, -1, NULL, NULL, NULL);
g_free(snapshot_path_utf8);
return snapshot_path;
}
static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
@ -1882,11 +1897,13 @@ void linphone_gtk_import_contacts(void) {
if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
LinphoneCore *lc = linphone_gtk_get_core();
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
char *filename_utf8 = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
char *filename = g_locale_from_utf8(filename_utf8, -1, NULL, NULL, NULL);
LinphoneFriendList *list = linphone_core_get_default_friend_list(lc);
linphone_friend_list_import_friends_from_vcard4_file(list, filename);
g_free(filename);
linphone_gtk_show_friends();
g_free(filename_utf8);
g_free(filename);
}
gtk_widget_destroy(dialog);
}
@ -1898,9 +1915,11 @@ void linphone_gtk_export_contacts(void) {
if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
LinphoneCore *lc = linphone_gtk_get_core();
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
char *filename_utf8 = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
char *filename = g_locale_from_utf8(filename_utf8, -1, NULL, NULL, NULL);
LinphoneFriendList *list = linphone_core_get_default_friend_list(lc);
linphone_friend_list_export_friends_as_vcard4_file(list, filename);
g_free(filename_utf8);
g_free(filename);
}
gtk_widget_destroy(dialog);

View file

@ -186,13 +186,13 @@
</columns>
<data>
<row>
<col id="0" translatable="no">default</col>
<col id="0">default</col>
</row>
<row>
<col id="0" translatable="no">high-fps</col>
<col id="0">high-fps</col>
</row>
<row>
<col id="0" translatable="no">custom</col>
<col id="0">custom</col>
</row>
</data>
</object>
@ -2086,7 +2086,7 @@
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="label39">
<object class="GtkLabel" id="nat_address_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>

View file

@ -1461,7 +1461,7 @@ void linphone_gtk_fill_video_renderers(GtkWidget *pb){
GtkTreeIter iter;
/* do not offer the user to select combo 'decoding/rendering' filter */
if (desc->enc_fmt != NULL)
if (desc->enc_fmt != NULL || (desc->flags & MS_FILTER_IS_ENABLED) == 0)
continue;
gtk_list_store_append(store,&iter);
@ -1670,6 +1670,9 @@ void linphone_gtk_show_parameters(void){
if(!linphone_core_upnp_available()) {
gtk_widget_hide(linphone_gtk_get_widget(pb,"use_upnp"));
}
gtk_widget_hide(linphone_gtk_get_widget(pb, "use_nat_address"));
gtk_widget_hide(linphone_gtk_get_widget(pb, "nat_address"));
gtk_widget_hide(linphone_gtk_get_widget(pb, "nat_address_label"));
mtu=linphone_core_get_mtu(lc);
if (mtu<=0){

View file

@ -192,8 +192,12 @@ void linphone_gtk_external_account_configuration_changed(GtkEntry *entry) {
gtk_assistant_set_page_complete(GTK_ASSISTANT(assistant), page, external_account_configuration_complete(page) > 0);
}
static bool_t check_username_validity(const char *username) {
return username && g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{3,}$", username, 0, 0);
}
void linphone_gtk_account_configuration_changed(GtkEntry *entry, GtkAssistant *assistant) {
gboolean complete = (gtk_entry_get_text_length(entry) > 0);
gboolean complete = check_username_validity(gtk_entry_get_text(entry));
GtkWidget *page = gtk_assistant_get_nth_page(assistant, gtk_assistant_get_current_page(assistant));
gtk_assistant_set_page_complete(assistant, page, complete);
}
@ -256,7 +260,7 @@ void linphone_gtk_account_creation_username_changed(GtkEntry *entry) {
linphone_account_creator_set_domain(creator, "sip.linphone.org");
linphone_account_creator_set_route(creator, "sip.linphone.org");
if (g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{3,}$", gtk_entry_get_text(username), 0, 0)) {
if (check_username_validity(gtk_entry_get_text(username))) {
guint timerID = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(page), "usernameAvailabilityTimerID"));
if (timerID > 0) {
g_source_remove(timerID);
@ -266,7 +270,7 @@ void linphone_gtk_account_creation_username_changed(GtkEntry *entry) {
} else {
if (gtk_entry_get_text_length(username) < LOGIN_MIN_SIZE) {
gtk_label_set_text(usernameError, "Username is too short");
} else if (!g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{3,}$", gtk_entry_get_text(username), 0, 0)) {
} else if (!check_username_validity(gtk_entry_get_text(username))) {
gtk_label_set_text(usernameError, "Unauthorized username");
}
g_object_set_data(G_OBJECT(page), "is_username_available", GINT_TO_POINTER(0));