From ec0c4ff2270514e1f21f07fcf731191482e2df0b Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.net> Date: Wed, 7 Oct 2009 12:43:50 -0400 Subject: [PATCH] [#2277] Fix direct ip2ip ZRTP enabling/disabling in ip2ip preferences --- sflphone-client-gnome/src/config/preferencesdialog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sflphone-client-gnome/src/config/preferencesdialog.c b/sflphone-client-gnome/src/config/preferencesdialog.c index a420814dea..34fdb8c0a4 100644 --- a/sflphone-client-gnome/src/config/preferencesdialog.c +++ b/sflphone-client-gnome/src/config/preferencesdialog.c @@ -140,10 +140,12 @@ static void key_exchange_changed_cb(GtkWidget *widget, gpointer data) DEBUG("Key exchange changed"); if (g_strcasecmp(gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget)), (gchar *) "ZRTP") == 0) { gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE); + g_hash_table_replace(directIpCallsProperties, g_strdup(ACCOUNT_SRTP_ENABLED), g_strdup("true")); g_hash_table_replace(directIpCallsProperties, g_strdup(ACCOUNT_KEY_EXCHANGE), g_strdup(ZRTP)); } else { gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE); DEBUG("Setting key exchange %s to %s\n", ACCOUNT_KEY_EXCHANGE, KEY_EXCHANGE_NONE); + g_hash_table_replace(directIpCallsProperties, g_strdup(ACCOUNT_SRTP_ENABLED), g_strdup("false")); g_hash_table_replace(directIpCallsProperties, g_strdup(ACCOUNT_KEY_EXCHANGE), g_strdup(KEY_EXCHANGE_NONE)); } } @@ -180,7 +182,9 @@ GtkWidget* create_direct_ip_calls_tab() directIpCallsProperties = sflphone_get_ip2ip_properties(); if(directIpCallsProperties != NULL) { + DEBUG("got a directIpCallsProperties"); curSRTPEnabled = g_hash_table_lookup(directIpCallsProperties, ACCOUNT_SRTP_ENABLED); + DEBUG(" curSRTPEnabled = %s", curSRTPEnabled); curKeyExchange = g_hash_table_lookup(directIpCallsProperties, ACCOUNT_KEY_EXCHANGE); curTlsEnabled = g_hash_table_lookup(directIpCallsProperties, TLS_ENABLE); } -- GitLab