aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-16 21:51:50 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-16 21:51:50 +0000
commitf3ec7ceb370bc26d0f1cfbb8c5e0b1af2ef54e61 (patch)
treee63d5520e4a8da23dd83e13454b5bef880adba42
parente51b557788170d61e2090028de5837f1577c0728 (diff)
downloadgnunet-gtk-f3ec7ceb370bc26d0f1cfbb8c5e0b1af2ef54e61.tar.gz
gnunet-gtk-f3ec7ceb370bc26d0f1cfbb8c5e0b1af2ef54e61.zip
-permit CNAME/PSEU despite existence of NICK, remove legacly NS logic
-rw-r--r--src/namestore/gnunet-namestore-gtk.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/namestore/gnunet-namestore-gtk.c b/src/namestore/gnunet-namestore-gtk.c
index 8c3ab0b3..3f6c58c3 100644
--- a/src/namestore/gnunet-namestore-gtk.c
+++ b/src/namestore/gnunet-namestore-gtk.c
@@ -660,7 +660,9 @@ check_record_permitted (unsigned int rd_count,
660 gint n_type) 660 gint n_type)
661{ 661{
662 unsigned int i; 662 unsigned int i;
663 unsigned int nick;
663 664
665 nick = 0;
664 for (i=0;i<rd_count;i++) 666 for (i=0;i<rd_count;i++)
665 { 667 {
666 switch (rd[i].record_type) 668 switch (rd[i].record_type)
@@ -674,22 +676,20 @@ check_record_permitted (unsigned int rd_count,
674 return GNUNET_NO; 676 return GNUNET_NO;
675 case GNUNET_GNSRECORD_TYPE_PKEY: 677 case GNUNET_GNSRECORD_TYPE_PKEY:
676 return GNUNET_NO; 678 return GNUNET_NO;
679 case GNUNET_GNSRECORD_TYPE_NICK:
680 nick++;
681 break;
677 default: 682 default:
678 break; 683 break;
679 } 684 }
680 } 685 }
686 rd_count -= nick;
681 if (0 == rd_count) 687 if (0 == rd_count)
682 return GNUNET_OK; 688 return GNUNET_OK;
683 switch (n_type) 689 switch (n_type)
684 { 690 {
685 case GNUNET_DNSPARSER_TYPE_CNAME: 691 case GNUNET_DNSPARSER_TYPE_CNAME:
686 return GNUNET_NO; 692 return GNUNET_NO;
687 case GNUNET_DNSPARSER_TYPE_NS:
688 for (i=0;i<rd_count;i++)
689 if ( (GNUNET_DNSPARSER_TYPE_A != rd[i].record_type) &&
690 (GNUNET_DNSPARSER_TYPE_AAAA != rd[i].record_type) )
691 return GNUNET_NO;
692 return GNUNET_OK;
693 case GNUNET_GNSRECORD_TYPE_PKEY: 693 case GNUNET_GNSRECORD_TYPE_PKEY:
694 return GNUNET_NO; 694 return GNUNET_NO;
695 default: 695 default:
@@ -1544,6 +1544,11 @@ launch_edit_dialog (gint n_type,
1544{ 1544{
1545 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *edc; 1545 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *edc;
1546 1546
1547 if (NULL == current_zone_option)
1548 {
1549 GNUNET_break (0);
1550 return;
1551 }
1547 edc = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginEnvironment); 1552 edc = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginEnvironment);
1548 if ( (NULL != ri) && 1553 if ( (NULL != ri) &&
1549 (off < ri->rd_count) ) 1554 (off < ri->rd_count) )