From 15e936c89fbae65bfae55d01a561e405aca40025 Mon Sep 17 00:00:00 2001 From: smorlat Date: Fri, 18 Sep 2009 20:31:39 +0000 Subject: [PATCH] present user id during authentication (needed for bluesip) git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@666 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/coreapi/authentication.c | 8 +++ linphone/coreapi/linphonecore.h | 1 + linphone/gtk-glade/main.c | 11 ++-- linphone/gtk-glade/password.glade | 53 +++++++++++-------- .../mediastreamer2/plugins/msx264/autogen.sh | 13 +++-- 5 files changed, 52 insertions(+), 34 deletions(-) diff --git a/linphone/coreapi/authentication.c b/linphone/coreapi/authentication.c index 425ca65c6..e84d2c306 100644 --- a/linphone/coreapi/authentication.c +++ b/linphone/coreapi/authentication.c @@ -60,6 +60,14 @@ void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *usernam if (username && strlen(username)>0) info->username=ms_strdup(username); } +void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid){ + if (info->userid){ + ms_free(info->userid); + info->userid=NULL; + } + if (userid && strlen(userid)>0) info->userid=ms_strdup(userid); +} + void linphone_auth_info_destroy(LinphoneAuthInfo *obj){ if (obj->username!=NULL) ms_free(obj->username); if (obj->userid!=NULL) ms_free(obj->userid); diff --git a/linphone/coreapi/linphonecore.h b/linphone/coreapi/linphonecore.h index fe389246b..05a0bd98b 100644 --- a/linphone/coreapi/linphonecore.h +++ b/linphone/coreapi/linphonecore.h @@ -370,6 +370,7 @@ LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *useri const char *passwd, const char *ha1,const char *realm); void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd); void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username); +void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid); /* you don't need those function*/ void linphone_auth_info_destroy(LinphoneAuthInfo *info); LinphoneAuthInfo * linphone_auth_info_new_from_config_file(struct _LpConfig *config, int pos); diff --git a/linphone/gtk-glade/main.c b/linphone/gtk-glade/main.c index f9cb4517f..9d9b550c4 100644 --- a/linphone/gtk-glade/main.c +++ b/linphone/gtk-glade/main.c @@ -736,8 +736,8 @@ void linphone_gtk_password_ok(GtkWidget *w){ g_object_weak_unref(G_OBJECT(window),(GWeakNotify)linphone_auth_info_destroy,info); entry=linphone_gtk_get_widget(window,"password_entry"); linphone_auth_info_set_passwd(info,gtk_entry_get_text(GTK_ENTRY(entry))); - linphone_auth_info_set_username(info, - gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"username_entry")))); + linphone_auth_info_set_userid(info, + gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"userid_entry")))); linphone_core_add_auth_info(linphone_gtk_get_core(),info); gtk_widget_destroy(window); } @@ -747,10 +747,11 @@ static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm GtkWidget *label=linphone_gtk_get_widget(w,"message"); LinphoneAuthInfo *info; gchar *msg; - msg=g_strdup_printf(_("Please enter your password for domain %s:"),realm); - gtk_label_set_text(GTK_LABEL(label),msg); + msg=g_strdup_printf(_("Please enter your password for username %s\n at domain %s:"), + username,realm); + gtk_label_set_markup(GTK_LABEL(label),msg); g_free(msg); - gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"username_entry")),username); + gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"userid_entry")),username); info=linphone_auth_info_new(username, NULL, NULL, NULL,realm); g_object_set_data(G_OBJECT(w),"auth_info",info); g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_auth_info_destroy,info); diff --git a/linphone/gtk-glade/password.glade b/linphone/gtk-glade/password.glade index ff1026bdc..6617f4831 100644 --- a/linphone/gtk-glade/password.glade +++ b/linphone/gtk-glade/password.glade @@ -1,15 +1,15 @@ - - - + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 Linphone - Authentication required True - GTK_WIN_POS_CENTER_ON_PARENT + center-on-parent linphone2.png - GDK_WINDOW_TYPE_HINT_DIALOG + dialog False @@ -25,8 +25,12 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Please enter the domain password + center True + + 0 + @@ -34,27 +38,27 @@ 2 2 - + + True + UserID + + + + True True + 1 2 - - - True - Username: - GTK_JUSTIFY_RIGHT - - True Password: - GTK_JUSTIFY_RIGHT + right 1 @@ -65,10 +69,9 @@ True True - True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False + @@ -92,38 +95,44 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_BUTTONBOX_END + end + gtk-ok True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-ok True - 0 + + False + False + 0 + + gtk-cancel True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-cancel True - 0 + False + False 1 False - GTK_PACK_END + end + 0 diff --git a/linphone/mediastreamer2/plugins/msx264/autogen.sh b/linphone/mediastreamer2/plugins/msx264/autogen.sh index d342f286b..829a5a0b7 100755 --- a/linphone/mediastreamer2/plugins/msx264/autogen.sh +++ b/linphone/mediastreamer2/plugins/msx264/autogen.sh @@ -1,13 +1,12 @@ #!/bin/sh -#AM_VERSION=1.10 -#1.9 was the recommended version -if test -n "$AM_VERSION" ; then +AM_VERSION=1.10 +if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then + ACLOCAL=aclocal + AUTOMAKE=automake +else ACLOCAL=aclocal-${AM_VERSION} AUTOMAKE=automake-${AM_VERSION} -else - ACLOCAL=aclocal - AUTOMAKE=automake fi echo "Generating build scripts in this mediastreamer plugin" @@ -16,5 +15,5 @@ libtoolize --copy --force $ACLOCAL $AUTOMAKE --force-missing --add-missing --copy autoconf -rm -rf config.cache +