[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-go] branch master updated: Add handling for supplemental records
From: |
gnunet |
Subject: |
[gnunet-go] branch master updated: Add handling for supplemental records. |
Date: |
Sat, 15 Feb 2020 12:11:23 +0100 |
This is an automated email from the git hooks/post-receive script.
bernd-fix pushed a commit to branch master
in repository gnunet-go.
The following commit(s) were added to refs/heads/master by this push:
new 7e13256 Add handling for supplemental records.
7e13256 is described below
commit 7e13256995f3af254d8637a9eb44a2702c6ef541
Author: Bernd Fix <address@hidden>
AuthorDate: Sat Feb 15 12:06:55 2020 +0100
Add handling for supplemental records.
---
src/gnunet/enums/gns.go | 7 ++++---
src/gnunet/service/gns/block_handler.go | 6 ++++--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/gnunet/enums/gns.go b/src/gnunet/enums/gns.go
index b9adfc2..6ba6f65 100644
--- a/src/gnunet/enums/gns.go
+++ b/src/gnunet/enums/gns.go
@@ -23,9 +23,10 @@ var (
GNS_MAX_BLOCK_SIZE = (63 * 1024) // Maximum size of a value that can be
stored in a GNS block.
// GNS record flags
- GNS_FLAG_PRIVATE = 2
- GNS_FLAGS_EXPREL = 8
- GNS_FLAG_SHADOW = 16
+ GNS_FLAG_PRIVATE = 2 // Record is not shared on the DHT
+ GNS_FLAG_SUPPL = 4 // Supplemental records (e.g. NICK) in a block
+ GNS_FLAG_EXPREL = 8 // Expire time in record is in relative time.
+ GNS_FLAG_SHADOW = 16 // Record is ignored if non-expired records of
same type exist in block
// GNS record types
GNS_TYPE_ANY = 0 // Record type indicating any
record/'*'
diff --git a/src/gnunet/service/gns/block_handler.go
b/src/gnunet/service/gns/block_handler.go
index 1b04bc6..747f26f 100644
--- a/src/gnunet/service/gns/block_handler.go
+++ b/src/gnunet/service/gns/block_handler.go
@@ -147,9 +147,11 @@ func NewBlockHandlerList(records
[]*message.GNSResourceRecord, labels []string)
// Third pass: Traverse active list and build list of handler instances.
for _, rec := range active {
- // update counter map
+ // update counter map for non-supplemental records
rrType := int(rec.Type)
- hl.counts.Add(rrType)
+ if (rrType & enums.GNS_FLAG_SUPPL) == 0 {
+ hl.counts.Add(rrType)
+ }
// check for custom handler type
if creat, ok := customHandler[rrType]; ok {
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet-go] branch master updated: Add handling for supplemental records.,
gnunet <=