[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/06: allow multiple GNS2DNS records to co-exist
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/06: allow multiple GNS2DNS records to co-exist |
Date: |
Sun, 20 May 2018 19:06:50 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 88da23e56af5b9d18112e421f2ef9022d8b8157f
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun May 20 18:42:01 2018 +0200
allow multiple GNS2DNS records to co-exist
---
src/namestore/gnunet-namestore.c | 28 ++++++++++------------------
1 file 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,
ret = 1;
test_finished ();
return;
- case GNUNET_GNSRECORD_TYPE_GNS2DNS:
- fprintf (stderr,
- _("A %s record exists already under `%s', no other records can
be added.\n"),
- "GNS2DNS",
- rec_name);
- ret = 1;
- test_finished ();
- return;
}
}
switch (type)
@@ -678,16 +670,16 @@ get_existing_record (void *cls,
}
break;
case GNUNET_GNSRECORD_TYPE_GNS2DNS:
- if (0 != rd_count)
- {
- fprintf (stderr,
- _("Records already exist under `%s', cannot add `%s'
record.\n"),
- rec_name,
- "GNS2DNS");
- ret = 1;
- test_finished ();
- return;
- }
+ for (unsigned int i=0;i<rd_count;i++)
+ if (GNUNET_GNSRECORD_TYPE_GNS2DNS != rd[i].record_type)
+ {
+ fprintf (stderr,
+ _("Non-GNS2DNS records already exist under `%s', cannot add
GNS2DNS record.\n"),
+ rec_name);
+ ret = 1;
+ test_finished ();
+ return;
+ }
break;
}
memset (rdn,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (565515da0 -> d9137653d), gnunet, 2018/05/20
- [GNUnet-SVN] [gnunet] 01/06: remove dead shorten logic, gnunet, 2018/05/20
- [GNUnet-SVN] [gnunet] 04/06: fix warning, gnunet, 2018/05/20
- [GNUnet-SVN] [gnunet] 06/06: guard more carefully against integer overflows, gnunet, 2018/05/20
- [GNUnet-SVN] [gnunet] 03/06: add logic to count concurrently active GNS requests, gnunet, 2018/05/20
- [GNUnet-SVN] [gnunet] 05/06: add test for gns2dns records pointing to DNS name, gnunet, 2018/05/20
- [GNUnet-SVN] [gnunet] 02/06: allow multiple GNS2DNS records to co-exist,
gnunet <=