diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c index f63a3dc9a..80f69648b 100644 --- a/linphone/coreapi/linphonecore.c +++ b/linphone/coreapi/linphonecore.c @@ -1095,8 +1095,10 @@ static void linphone_core_grab_buddy_infos(LinphoneCore *lc, LinphoneProxyConfig if (linphone_core_lookup_known_proxy(lc,url)==cfg){ if (lf->url->url->username!=NULL && lf->url->url->username[0]!='0'){ BuddyLookupRequest *req; + char tmp[255]; + snprintf(tmp,sizeof(tmp),"sip:%s@%s",lf->url->url->username,lf->url->url->host); req=sip_setup_context_create_buddy_lookup_request(ctx); - buddy_lookup_request_set_key(req,lf->url->url->username); + buddy_lookup_request_set_key(req,tmp); buddy_lookup_request_set_max_results(req,1); sip_setup_context_buddy_lookup_submit(ctx,req); lc->bl_reqs=ms_list_append(lc->bl_reqs,req); diff --git a/linphone/gtk-glade/buddylookup.c b/linphone/gtk-glade/buddylookup.c index f0b2f6195..55c3f334e 100644 --- a/linphone/gtk-glade/buddylookup.c +++ b/linphone/gtk-glade/buddylookup.c @@ -143,9 +143,13 @@ static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){ ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext"); last_state=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"last_state")); - if (req==NULL) return FALSE; + if (req==NULL) { + g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(0)); + return FALSE; + } bls=req->status; if (last_state==bls) return TRUE; + switch(bls){ case BuddyLookupNone: gtk_progress_bar_set_fraction(pb,0); diff --git a/linphone/gtk-glade/friendlist.c b/linphone/gtk-glade/friendlist.c index 5e7d48137..0ab9cf196 100644 --- a/linphone/gtk-glade/friendlist.c +++ b/linphone/gtk-glade/friendlist.c @@ -272,7 +272,8 @@ void linphone_gtk_directory_search_activate(GtkWidget *entry){ LinphoneProxyConfig *cfg; linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg); GtkWidget *w=linphone_gtk_show_buddy_lookup_window(linphone_proxy_config_get_sip_setup_context(cfg)); - linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry))); + if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==1) + linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry))); } void linphone_gtk_directory_search_button_clicked(GtkWidget *button){ diff --git a/linphone/gtk-glade/main.c b/linphone/gtk-glade/main.c index ba2107c06..0e85fe32b 100644 --- a/linphone/gtk-glade/main.c +++ b/linphone/gtk-glade/main.c @@ -706,6 +706,12 @@ static void linphone_gtk_new_subscriber_response(GtkWidget *dialog, guint respon static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url){ GtkWidget *dialog; + + if (linphone_gtk_get_ui_config_int("subscribe_deny_all",0)){ + linphone_core_reject_subscriber(linphone_gtk_get_core(),lf); + return; + } + gchar *message=g_strdup_printf(_("%s would like to add you to his contact list.\nWould you allow him to see your presence status or add him to your contact list ?\nIf you answer no, this person will be temporarily blacklisted."),url); dialog = gtk_message_dialog_new ( GTK_WINDOW(linphone_gtk_get_main_window()),