aboutsummaryrefslogtreecommitdiff
path: root/src/setup/gnunet-setup-gns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup/gnunet-setup-gns.c')
-rw-r--r--src/setup/gnunet-setup-gns.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/setup/gnunet-setup-gns.c b/src/setup/gnunet-setup-gns.c
index e25f6609..9b7115ad 100644
--- a/src/setup/gnunet-setup-gns.c
+++ b/src/setup/gnunet-setup-gns.c
@@ -26,6 +26,7 @@
26#include "gnunet_gtk.h" 26#include "gnunet_gtk.h"
27#include "gnunet-setup-gns.h" 27#include "gnunet-setup-gns.h"
28#include "gnunet-setup-gns-edit.h" 28#include "gnunet-setup-gns-edit.h"
29#include <gnunet/gnunet_gns_service.h>
29#include <gnunet/gnunet_namestore_service.h> 30#include <gnunet/gnunet_namestore_service.h>
30#include <gnunet/gnunet_dnsparser_lib.h> 31#include <gnunet/gnunet_dnsparser_lib.h>
31 32
@@ -42,11 +43,6 @@
42#define NEW_RECORD_STR gettext_noop ("<new record>") 43#define NEW_RECORD_STR gettext_noop ("<new record>")
43 44
44/** 45/**
45 * Text we use for 'our own zone'. FIXME: define as constant in GNS?
46 */
47#define ROOT_STR "+"
48
49/**
50 * Text we use for the expiration to mean 'never expires'. 46 * Text we use for the expiration to mean 'never expires'.
51 */ 47 */
52#define EXPIRE_NEVER_STRING gettext_noop ("never") 48#define EXPIRE_NEVER_STRING gettext_noop ("never")
@@ -828,7 +824,7 @@ check_name_validity_and_commit (GtkTreeIter *it,
828 g_free (name); 824 g_free (name);
829 return; 825 return;
830 } 826 }
831 if ( (0 == strcmp (name, ROOT_STR)) && 827 if ( (0 == strcmp (name, GNUNET_GNS_MASTERZONE_STR)) &&
832 (0 == strcmp (current_zone_option, "ZONEKEY")) ) 828 (0 == strcmp (current_zone_option, "ZONEKEY")) )
833 { 829 {
834 /* We have to append PSEU RECORD, this is the 'master' zone */ 830 /* We have to append PSEU RECORD, this is the 'master' zone */
@@ -1082,7 +1078,7 @@ remove_records_by_path (const gchar *path)
1082 g_free (n_name); 1078 g_free (n_name);
1083 g_free (n_value); 1079 g_free (n_value);
1084 } 1080 }
1085 else if (0 != strcmp (name, ROOT_STR)) 1081 else if (0 != strcmp (name, GNUNET_GNS_MASTERZONE_STR))
1086 { 1082 {
1087 /* Removing the whole name record */ 1083 /* Removing the whole name record */
1088 rc = GNUNET_malloc(sizeof (struct RemoveContext)); 1084 rc = GNUNET_malloc(sizeof (struct RemoveContext));
@@ -1401,7 +1397,7 @@ GNUNET_setup_gns_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer,
1401 return; 1397 return;
1402 if ( (GNUNET_OK != 1398 if ( (GNUNET_OK !=
1403 GNUNET_DNSPARSER_check_label (new_text)) && 1399 GNUNET_DNSPARSER_check_label (new_text)) &&
1404 (0 != strcmp (new_text, ROOT_STR)) ) 1400 (0 != strcmp (new_text, GNUNET_GNS_MASTERZONE_STR)) )
1405 { 1401 {
1406 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1402 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1407 _("Name `%s' invalid for GADS/DNS (too long for a DNS label?)\n"), 1403 _("Name `%s' invalid for GADS/DNS (too long for a DNS label?)\n"),
@@ -1944,7 +1940,7 @@ zone_iteration_proc (void *cls,
1944 return; 1940 return;
1945 } 1941 }
1946 if ( (GNUNET_SYSERR == GNUNET_DNSPARSER_check_label (name)) && 1942 if ( (GNUNET_SYSERR == GNUNET_DNSPARSER_check_label (name)) &&
1947 (0 != strcmp (name, ROOT_STR)) ) 1943 (0 != strcmp (name, GNUNET_GNS_MASTERZONE_STR)) )
1948 { 1944 {
1949 GNUNET_break (0); 1945 GNUNET_break (0);
1950 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1946 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2009,7 +2005,7 @@ zone_iteration_proc (void *cls,
2009 else 2005 else
2010 GNUNET_asprintf (&type_str, "%s", EXPIRE_INVALID_STRING); 2006 GNUNET_asprintf (&type_str, "%s", EXPIRE_INVALID_STRING);
2011 2007
2012 if ( (0 == strcmp (name, ROOT_STR)) && 2008 if ( (0 == strcmp (name, GNUNET_GNS_MASTERZONE_STR)) &&
2013 (GNUNET_NAMESTORE_TYPE_PSEU == rd[c].record_type) ) 2009 (GNUNET_NAMESTORE_TYPE_PSEU == rd[c].record_type) )
2014 { 2010 {
2015 pseu_entry = GTK_ENTRY((GNUNET_SETUP_get_object ("GNUNET_setup_gns_pseu_entry"))); 2011 pseu_entry = GTK_ENTRY((GNUNET_SETUP_get_object ("GNUNET_setup_gns_pseu_entry")));