From fc09f54e166c84c847fac10155eb47a8f3fd5d15 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Tue, 31 Dec 2013 15:42:01 +0100 Subject: [PATCH] Moved LDAP configuration into a popup. --- coreapi/ldap/ldapprovider.c | 16 +- gtk/Makefile.am | 3 +- gtk/ldap.ui | 669 ++++++++++++++++++++++++++++++++++++ gtk/parameters.ui | 432 +++-------------------- gtk/propertybox.c | 148 +++++--- 5 files changed, 829 insertions(+), 439 deletions(-) create mode 100644 gtk/ldap.ui diff --git a/coreapi/ldap/ldapprovider.c b/coreapi/ldap/ldapprovider.c index 8392ff8cb..93bd84787 100644 --- a/coreapi/ldap/ldapprovider.c +++ b/coreapi/ldap/ldapprovider.c @@ -288,7 +288,10 @@ static bool_t linphone_ldap_contact_provider_iterate(void *data) linphone_ldap_contact_provider_handle_search_result(obj, req, message ); message = ldap_next_message(obj->ld, message); } - if( req && ret == LDAP_RES_SEARCH_RESULT) linphone_ldap_contact_provider_cancel_search(LINPHONE_CONTACT_PROVIDER(obj), LINPHONE_CONTACT_SEARCH(req)); + if( req && ret == LDAP_RES_SEARCH_RESULT) + linphone_ldap_contact_provider_cancel_search( + LINPHONE_CONTACT_PROVIDER(obj), + LINPHONE_CONTACT_SEARCH(req)); break; } case LDAP_RES_MODIFY: @@ -312,8 +315,14 @@ static bool_t linphone_ldap_contact_provider_iterate(void *data) for( i=0; ireq_count; i++){ LinphoneLDAPContactSearch* search = (LinphoneLDAPContactSearch*)ms_list_nth_data( obj->requests, i ); if( search && search->msgid == 0){ + int ret; ms_message("Found pending search %p (for %s), launching...", search, search->filter); - linphone_ldap_contact_provider_perform_search(obj, search); + ret = linphone_ldap_contact_provider_perform_search(obj, search); + if( ret != LDAP_SUCCESS ){ + linphone_ldap_contact_provider_cancel_search( + LINPHONE_CONTACT_PROVIDER(obj), + LINPHONE_CONTACT_SEARCH(search)); + } } } } @@ -623,6 +632,7 @@ static unsigned int linphone_ldap_contact_provider_cancel_search(LinphoneContact MSList* list_entry = ms_list_find_custom(ldap_cp->requests, linphone_ldap_request_entry_compare_strong, req); if( list_entry ) { + ms_message("Delete search %p", req); ldap_cp->requests = ms_list_remove_link(ldap_cp->requests, list_entry); ldap_cp->req_count--; ret = 0; // return OK if we found it in the monitored requests @@ -639,7 +649,7 @@ static int linphone_ldap_contact_provider_perform_search( LinphoneLDAPContactPro struct timeval timeout = { obj->timeout, 0 }; if( req->msgid == 0 ){ - ms_message ( "Calling ldap_search_ext with predicate '%s' on base %s", req->filter, obj->base_object ); + ms_message ( "Calling ldap_search_ext with predicate '%s' on base '%s', ld %p, attrs '%s', maxres = %d", req->filter, obj->base_object, obj->ld, obj->attributes[0], obj->max_results ); ret = ldap_search_ext(obj->ld, obj->base_object,// base from which to start LDAP_SCOPE_SUBTREE, diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 2f13d8b49..f9240eb02 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -11,7 +11,8 @@ UI_FILES= about.ui \ tunnel_config.ui \ waiting.ui \ dscp_settings.ui \ - call_statistics.ui + call_statistics.ui \ + ldap.ui PIXMAPS= \ stock_people.png diff --git a/gtk/ldap.ui b/gtk/ldap.ui new file mode 100644 index 000000000..ba3bf7163 --- /dev/null +++ b/gtk/ldap.ui @@ -0,0 +1,669 @@ + + + + + + False + LDAP Settings + + + True + False + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 5 + 2 + + + True + False + 1 + Server address: + + + + + True + False + Authentication method: + + + 1 + 2 + + + + + True + False + Username: + + + 2 + 3 + + + + + True + False + Password: + + + 3 + 4 + + + + + Use TLS Connection + True + False + True + False + Not yet available + False + True + + + 1 + 2 + 4 + 5 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + 2 + 3 + + + + + True + True + False + False + False + True + True + + + 1 + 2 + 3 + 4 + + + + + True + False + liststore2 + 0 + + + + 0 + + + + + 1 + 2 + 1 + 2 + + + + + + + + + + + + True + False + <b>Connection</b> + True + + + + + True + True + 0 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 3 + 2 + + + True + False + Bind DN + + + + + True + False + Authname + + + 1 + 2 + + + + + True + False + Realm + + + 2 + 3 + + + + + True + True + + False + False + True + True + + + 1 + 2 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + 1 + 2 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + 2 + 3 + + + + + + + + + True + False + <b>SASL</b> + True + + + + + True + True + 1 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 5 + 2 + + + True + False + Base object: + + + + + True + False + Filter (%s for name): + + + 1 + 2 + + + + + True + False + Name Attribute: + + + 2 + 3 + + + + + True + False + SIP address attribute: + + + 3 + 4 + + + + + True + False + Attributes to query: + + + 4 + 5 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + 1 + 2 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + 2 + 3 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + 3 + 4 + + + + + True + True + + True + False + False + True + True + + + 1 + 2 + 4 + 5 + + + + + + + + + True + False + <b>Search</b> + True + + + + + True + True + 2 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 3 + 2 + + + True + False + Timeout for search: + + + + + True + False + Max results: + + + 1 + 2 + + + + + True + True + + True + False + False + True + True + timeout_adjustment + + + 1 + 2 + + + + + True + True + 3 + + True + False + False + True + True + result_adjustment + True + + + 1 + 2 + 1 + 2 + + + + + Follow Aliases + True + True + False + False + True + + + 1 + 2 + 2 + 3 + + + + + + + + + + + + True + False + <b>Miscellaneous</b> + True + + + + + True + True + 3 + + + + + True + False + 2 + + + + + + gtk-apply + True + True + True + False + True + + + + False + False + end + 1 + + + + + gtk-cancel + True + True + True + False + True + + + + False + False + end + 2 + + + + + False + True + 4 + + + + + + + + + + + + + ANONYMOUS + + + SIMPLE + + + DIGEST-MD5 + + + NTLM + + + + + 1 + 100 + 50 + 1 + 10 + + + 1 + 100 + 10 + 1 + 10 + + diff --git a/gtk/parameters.ui b/gtk/parameters.ui index 5f42cf9c5..7705e1319 100644 --- a/gtk/parameters.ui +++ b/gtk/parameters.ui @@ -2470,13 +2470,15 @@ True False - 12 + 0 + 0 True False - 5 + 4 2 + True True @@ -2484,6 +2486,10 @@ 1 Server address: + + GTK_SHRINK + GTK_SHRINK + @@ -2494,6 +2500,7 @@ 1 2 + GTK_EXPAND | GTK_SHRINK @@ -2505,381 +2512,66 @@ 2 3 + GTK_SHRINK - - True - False - Password: - - - 3 - 4 - - - - - Use TLS Connection + + gtk-edit True True - False + True False - True - - - 1 - 2 - 4 - 5 - - - - - True - True - - False - False - True - True - - - 1 - 2 - - - - - True - True - - False - False - True - True - - - 1 - 2 - 2 - 3 - - - - - True - True - - True - False - False - True - True + True + 1 2 3 4 + GTK_SHRINK + GTK_SHRINK - + True False - liststore2 - 0 - 0 - 0 - - - - 0 - - + label + + + 1 + 2 + GTK_SHRINK + + + + + True + False + label 1 2 1 2 + GTK_SHRINK - - - - - - - True - False - <b>Connection</b> - True - - - - - True - True - 0 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - 5 - 2 - + True False - Base object: - - - - - True - False - Filter (%s for name): - - - 1 - 2 - - - - - True - False - Name Attribute: - - - 2 - 3 - - - - - True - False - SIP address attribute: - - - 3 - 4 - - - - - True - False - Attributes to query: - - - 4 - 5 - - - - - True - True - - False - False - True - True - - - 1 - 2 - - - - - True - True - - False - False - True - True - - - 1 - 2 - 1 - 2 - - - - - True - True - - False - False - True - True - - - 1 - 2 - 2 - 3 - - - - - True - True - - False - False - True - True - - - 1 - 2 - 3 - 4 - - - - - True - True - - False - False - True - True - - - 1 - 2 - 4 - 5 - - - - - - - - - True - False - <b>Search</b> - True - - - - - True - True - 1 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - 3 - 2 - - - True - False - Timeout for search: - - - - - True - False - Max results: - - - 1 - 2 - - - - - True - True - - False - False - True - True - adjustment9 - - - 1 - 2 - - - - - True - True - 3 - - False - False - True - True - adjustment10 - True - - - 1 - 2 - 1 - 2 - - - - - Follow Aliases - True - True - False - False - True + label 1 2 2 3 + GTK_SHRINK @@ -2890,66 +2582,22 @@ - + True False - <b>Miscellaneous</b> + <b>LDAP Account setup</b> True - True + False True - 2 + 0 - - True - False - 2 - - - - - - Save - True - True - True - False - - - - False - False - end - 1 - - - - - Reset - True - True - True - False - - - - False - False - end - 2 - - - - - False - True - 3 - + diff --git a/gtk/propertybox.c b/gtk/propertybox.c index 4590e106c..01134c073 100644 --- a/gtk/propertybox.c +++ b/gtk/propertybox.c @@ -60,125 +60,181 @@ static void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active); } +static void linphone_gtk_ldap_display( GtkWidget* param ) +{ + LpConfig* config = linphone_core_get_config(linphone_gtk_get_core()); + LinphoneDictionary* ldap_conf = lp_config_section_to_dict(config,"ldap"); + GtkLabel* label; + + ms_message("linphone_gtk_ldap_display"); + label= GTK_LABEL(linphone_gtk_get_widget(param,"ldap_server")); + gtk_label_set_text(label, linphone_dictionary_get_string(ldap_conf,"server", "ldap://localhost") ); + + label = GTK_LABEL(linphone_gtk_get_widget(param,"ldap_auth_method")); + gtk_label_set_text(label, linphone_dictionary_get_string(ldap_conf,"auth_method", "ANONYMOUS") ); + + label = GTK_LABEL(linphone_gtk_get_widget(param,"ldap_username")); + gtk_label_set_text(label, linphone_dictionary_get_string(ldap_conf,"username", "") ); +} + +static void linphone_gtk_ldap_set_authcombo( GtkComboBox* box, const char* authmethod ) +{ + GtkTreeModel* model = GTK_TREE_MODEL(gtk_combo_box_get_model(box)); + GtkTreeIter iter; + g_return_if_fail(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter) ); + + do{ + const char* value; + + gtk_tree_model_get(model,&iter,0,&value,-1); + if( value && strcmp(value, authmethod) == 0){ + gtk_combo_box_set_active_iter(box, &iter); + break; + } + + }while(gtk_tree_model_iter_next(model,&iter)); +} + static void linphone_gtk_ldap_load_settings(GtkWidget* param) { - GtkWidget *mw = linphone_gtk_get_main_window(); - GtkWidget *pb = (GtkWidget *) g_object_get_data(G_OBJECT(mw), "parameters"); LpConfig* config = linphone_core_get_config(linphone_gtk_get_core()); LinphoneDictionary* ldap_conf = lp_config_section_to_dict(config,"ldap"); GtkEntry* entry; GtkToggleButton* toggle; GtkSpinButton* spin; + GtkComboBox* cbox; - toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ldap_use_tls")); + toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(param,"ldap_use_tls")); gtk_toggle_button_set_active(toggle, linphone_dictionary_get_int(ldap_conf,"use_tls", 0) ); - - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_server")); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_server")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"server", "ldap://localhost") ); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_username")); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_username")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"username", "") ); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_password")); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_password")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"password", "") ); - // TODO - // GtkComboBox* cbox = GTK_COMBO_BOX(linphone_gtk_get_widget(pb,"ldap_auth_method")); - // gtk_combo_box_set_active(entry, linphone_dictionary_get_string(ldap_conf,"auth_method", "ANONYMOUS") ); + // SASL + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_bind_dn")); + gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"bind_dn", "") ); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_sasl_authname")); + gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"sasl_authname", "") ); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_sasl_realm")); + gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"sasl_realm", "") ); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_base_object")); + cbox = GTK_COMBO_BOX(linphone_gtk_get_widget(param,"ldap_auth_method")); + linphone_gtk_ldap_set_authcombo(cbox, linphone_dictionary_get_string(ldap_conf,"auth_method", "ANONYMOUS")); + + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_base_object")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"base_object", "dc=example,dc=com") ); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_filter")); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_filter")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"filter", "uid=*%s*") ); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_name_attribute")); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_name_attribute")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"name_attribute", "cn") ); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_sip_attribute")); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_sip_attribute")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"sip_attribute", "mobile") ); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_attributes")); + entry = GTK_ENTRY(linphone_gtk_get_widget(param,"ldap_attributes")); gtk_entry_set_text(entry, linphone_dictionary_get_string(ldap_conf,"attributes", "cn,givenName,sn,mobile,homePhone") ); - toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ldap_deref_aliases")); + toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(param,"ldap_deref_aliases")); gtk_toggle_button_set_active(toggle, linphone_dictionary_get_int(ldap_conf,"deref_aliases", 0) ); - spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"ldap_max_results")); + spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(param,"ldap_max_results")); gtk_spin_button_set_value(spin, linphone_dictionary_get_int(ldap_conf,"max_results", 50) ); - spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"ldap_timeout")); + spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(param,"ldap_timeout")); gtk_spin_button_set_value(spin, linphone_dictionary_get_int(ldap_conf,"timeout", 10) ); - // TODO: add missing LDAP components - // TODO: move this to an external box - } -void linphone_gtk_ldap_reset(GtkWidget *tabmgr) + +void linphone_gtk_show_ldap_config(GtkWidget* button) { - GtkWidget *mw = linphone_gtk_get_main_window(); - GtkWidget *pb = (GtkWidget *) g_object_get_data(G_OBJECT(mw), "parameters"); - ms_message("RESET LDAP"); - linphone_gtk_ldap_load_settings(pb); + GtkWidget* param = gtk_widget_get_toplevel(button); + GtkWidget* ldap_config = linphone_gtk_create_window("ldap"); + linphone_gtk_ldap_load_settings(ldap_config); + + // to refresh parameters when the ldap config is destroyed + g_object_weak_ref(G_OBJECT(ldap_config), (GWeakNotify)linphone_gtk_ldap_display, (gpointer)param); + + gtk_widget_show(ldap_config); } -void linphone_gtk_ldap_save(GtkWidget *tabmgr) +void linphone_gtk_ldap_reset(GtkWidget *button) +{ + GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button)); + ms_message("RESET LDAP"); + gtk_widget_destroy(w); +} + +void linphone_gtk_ldap_save(GtkWidget *button) { LinphoneCore *lc = linphone_gtk_get_core(); LpConfig* conf = linphone_core_get_config(lc); LinphoneDictionary* dict = linphone_dictionary_new(); - GtkWidget *mw = linphone_gtk_get_main_window(); - GtkWidget *pb = (GtkWidget *) g_object_get_data(G_OBJECT(mw), "parameters"); + GtkWidget *ldap_widget = gtk_widget_get_toplevel(button); GtkEntry* entry; GtkToggleButton* toggle; GtkSpinButton* spin; ms_message("SAVE LDAP"); - toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ldap_use_tls")); + toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(ldap_widget,"ldap_use_tls")); linphone_dictionary_set_int(dict, "use_tls", gtk_toggle_button_get_active(toggle)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_server")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_server")); linphone_dictionary_set_string(dict, "server", gtk_entry_get_text(entry)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_username")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_username")); linphone_dictionary_set_string(dict, "username", gtk_entry_get_text(entry)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_password")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_password")); linphone_dictionary_set_string(dict, "password", gtk_entry_get_text(entry)); + // SASL + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_bind_dn")); + linphone_dictionary_set_string(dict, "bind_dn", gtk_entry_get_text(entry)); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_sasl_authname")); + linphone_dictionary_set_string(dict, "sasl_authname", gtk_entry_get_text(entry)); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_sasl_realm")); + linphone_dictionary_set_string(dict, "sasl_realm", gtk_entry_get_text(entry)); - GtkComboBox* cbox = GTK_COMBO_BOX(linphone_gtk_get_widget(pb,"ldap_auth_method")); + + GtkComboBox* cbox = GTK_COMBO_BOX(linphone_gtk_get_widget(ldap_widget,"ldap_auth_method")); linphone_dictionary_set_string(dict, "auth_method", gtk_combo_box_get_active_text(cbox)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_base_object")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_base_object")); linphone_dictionary_set_string(dict, "base_object", gtk_entry_get_text(entry)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_filter")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_filter")); linphone_dictionary_set_string(dict, "filter", gtk_entry_get_text(entry)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_name_attribute")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_name_attribute")); linphone_dictionary_set_string(dict, "name_attribute", gtk_entry_get_text(entry)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_sip_attribute")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_sip_attribute")); linphone_dictionary_set_string(dict, "sip_attribute", gtk_entry_get_text(entry)); - entry = GTK_ENTRY(linphone_gtk_get_widget(pb,"ldap_attributes")); + entry = GTK_ENTRY(linphone_gtk_get_widget(ldap_widget,"ldap_attributes")); linphone_dictionary_set_string(dict, "attributes", gtk_entry_get_text(entry)); - toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ldap_deref_aliases")); + toggle = GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(ldap_widget,"ldap_deref_aliases")); linphone_dictionary_set_int(dict, "deref_aliases", gtk_toggle_button_get_active(toggle)); - spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"ldap_max_results")); + spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(ldap_widget,"ldap_max_results")); linphone_dictionary_set_int(dict, "max_results", gtk_spin_button_get_value(spin) ); - spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"ldap_timeout")); + spin = GTK_SPIN_BUTTON(linphone_gtk_get_widget(ldap_widget,"ldap_timeout")); linphone_dictionary_set_int(dict, "timeout", gtk_spin_button_get_value(spin) ); ms_message("Create LDAP from config"); @@ -186,6 +242,12 @@ void linphone_gtk_ldap_save(GtkWidget *tabmgr) linphone_gtk_set_ldap( linphone_ldap_contact_provider_create(lc, dict) ); // save the config to linphonerc: lp_config_load_dict_to_section(conf, "ldap", dict); + + linphone_dictionary_unref(dict); + + // close widget + gtk_widget_destroy(ldap_widget); + } void linphone_gtk_fill_video_sizes(GtkWidget *combo){ @@ -1435,7 +1497,7 @@ void linphone_gtk_show_parameters(void){ /* LDAP CONFIG */ if( linphone_gtk_is_ldap_supported() ) { // if LDAP provider is available - linphone_gtk_ldap_load_settings(pb); + linphone_gtk_ldap_display(pb); } else { // hide the LDAP tab GtkNotebook* notebook = GTK_NOTEBOOK(linphone_gtk_get_widget(pb, "notebook1"));