diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-12 13:06:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-12 13:06:43 +0000 |
commit | 3e948e8165d6f5290ddd9760cb68115838484ba8 (patch) | |
tree | a9861c38805151c1d8d55bddc859e52cc24b5523 | |
parent | 12003b2fb0331b7cf1e11da8b89586d3f56fb260 (diff) | |
download | gnunet-gtk-3e948e8165d6f5290ddd9760cb68115838484ba8.tar.gz gnunet-gtk-3e948e8165d6f5290ddd9760cb68115838484ba8.zip |
remove sections on deletion from GUI, remove domain if there are no more redirects
-rw-r--r-- | src/setup/gnunet-setup-options.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c index ab969c5c..c5daf0f2 100644 --- a/src/setup/gnunet-setup-options.c +++ b/src/setup/gnunet-setup-options.c | |||
@@ -757,7 +757,6 @@ update_vpn_dns_configuration (GtkTreeModel * tm) | |||
757 | { | 757 | { |
758 | GNUNET_free (tmp); | 758 | GNUNET_free (tmp); |
759 | } | 759 | } |
760 | |||
761 | GNUNET_asprintf (&tmp, "%u:%s:%u %s", srcport, targethost, targetport, | 760 | GNUNET_asprintf (&tmp, "%u:%s:%u %s", srcport, targethost, targetport, |
762 | (0 == | 761 | (0 == |
763 | strcasecmp ("tcp", | 762 | strcasecmp ("tcp", |
@@ -793,7 +792,9 @@ update_vpn_dns_configuration (GtkTreeModel * tm) | |||
793 | if (strlen (pos->tcpred) > 0) | 792 | if (strlen (pos->tcpred) > 0) |
794 | GNUNET_CONFIGURATION_set_value_string (cfg, pos->section, "TCP_REDIRECTS", | 793 | GNUNET_CONFIGURATION_set_value_string (cfg, pos->section, "TCP_REDIRECTS", |
795 | pos->tcpred); | 794 | pos->tcpred); |
796 | GNUNET_CONFIGURATION_set_value_number (cfg, pos->section, "TTL", pos->ttl); | 795 | if ( (strlen (pos->udpred) > 0) || |
796 | (strlen (pos->tcpred) > 0) ) | ||
797 | GNUNET_CONFIGURATION_set_value_number (cfg, pos->section, "TTL", pos->ttl); | ||
797 | GNUNET_free_non_null (pos->altnames); | 798 | GNUNET_free_non_null (pos->altnames); |
798 | GNUNET_free (pos->tcpred); | 799 | GNUNET_free (pos->tcpred); |
799 | GNUNET_free (pos->udpred); | 800 | GNUNET_free (pos->udpred); |
@@ -848,6 +849,8 @@ save_vpn_dns_service_dnsname (GtkCellRendererText * renderer, gchar * path, | |||
848 | /* deletion */ | 849 | /* deletion */ |
849 | gtk_list_store_remove (ls, &iter); | 850 | gtk_list_store_remove (ls, &iter); |
850 | g_free (old); | 851 | g_free (old); |
852 | /* update configuration */ | ||
853 | update_vpn_dns_configuration (tm); | ||
851 | return; | 854 | return; |
852 | } | 855 | } |
853 | /* update model */ | 856 | /* update model */ |