diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-20 18:42:01 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-20 18:42:01 +0200 |
commit | 88da23e56af5b9d18112e421f2ef9022d8b8157f (patch) | |
tree | 0a84ae5831ebcd3d34d76ec61ca382ee545e71e1 /src/namestore | |
parent | 6f32b2b8ccbf536ddd38a3f6e8a4ec486b12e78b (diff) | |
download | gnunet-88da23e56af5b9d18112e421f2ef9022d8b8157f.tar.gz gnunet-88da23e56af5b9d18112e421f2ef9022d8b8157f.zip |
allow multiple GNS2DNS records to co-exist
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-namestore.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 753ee79d1..83a7ee349 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -641,14 +641,6 @@ get_existing_record (void *cls, | |||
641 | ret = 1; | 641 | ret = 1; |
642 | test_finished (); | 642 | test_finished (); |
643 | return; | 643 | return; |
644 | case GNUNET_GNSRECORD_TYPE_GNS2DNS: | ||
645 | fprintf (stderr, | ||
646 | _("A %s record exists already under `%s', no other records can be added.\n"), | ||
647 | "GNS2DNS", | ||
648 | rec_name); | ||
649 | ret = 1; | ||
650 | test_finished (); | ||
651 | return; | ||
652 | } | 644 | } |
653 | } | 645 | } |
654 | switch (type) | 646 | switch (type) |
@@ -678,16 +670,16 @@ get_existing_record (void *cls, | |||
678 | } | 670 | } |
679 | break; | 671 | break; |
680 | case GNUNET_GNSRECORD_TYPE_GNS2DNS: | 672 | case GNUNET_GNSRECORD_TYPE_GNS2DNS: |
681 | if (0 != rd_count) | 673 | for (unsigned int i=0;i<rd_count;i++) |
682 | { | 674 | if (GNUNET_GNSRECORD_TYPE_GNS2DNS != rd[i].record_type) |
683 | fprintf (stderr, | 675 | { |
684 | _("Records already exist under `%s', cannot add `%s' record.\n"), | 676 | fprintf (stderr, |
685 | rec_name, | 677 | _("Non-GNS2DNS records already exist under `%s', cannot add GNS2DNS record.\n"), |
686 | "GNS2DNS"); | 678 | rec_name); |
687 | ret = 1; | 679 | ret = 1; |
688 | test_finished (); | 680 | test_finished (); |
689 | return; | 681 | return; |
690 | } | 682 | } |
691 | break; | 683 | break; |
692 | } | 684 | } |
693 | memset (rdn, | 685 | memset (rdn, |