gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: do not put NULL block


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: do not put NULL block
Date: Thu, 04 Jan 2018 22:37:22 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 23a95ded8 do not put NULL block
23a95ded8 is described below

commit 23a95ded83313c8df50c5c34e0c12469e056545c
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Jan 4 22:37:20 2018 +0100

    do not put NULL block
---
 src/regex/regex_internal_dht.c | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c
index b80dabca0..828bb1648 100644
--- a/src/regex/regex_internal_dht.c
+++ b/src/regex/regex_internal_dht.c
@@ -154,23 +154,30 @@ regex_iterator (void *cls,
                     NULL, NULL);
   }
   block = REGEX_BLOCK_create (proof,
-                              num_edges, edges,
+                              num_edges,
+                             edges,
                               accepting,
                               &size);
-  (void)
-  GNUNET_DHT_put (h->dht, key,
-                  DHT_REPLICATION,
-                  DHT_OPT,
-                  GNUNET_BLOCK_TYPE_REGEX,
-                  size, block,
-                  GNUNET_TIME_relative_to_absolute (DHT_TTL),
-                  NULL, NULL);
+  if (NULL == block)
+    return;
+  (void) GNUNET_DHT_put (h->dht,
+                        key,
+                        DHT_REPLICATION,
+                        DHT_OPT,
+                        GNUNET_BLOCK_TYPE_REGEX,
+                        size,
+                        block,
+                        GNUNET_TIME_relative_to_absolute (DHT_TTL),
+                        NULL,
+                        NULL);
   GNUNET_STATISTICS_update (h->stats,
                             "# regex blocks stored",
-                            1, GNUNET_NO);
+                            1,
+                           GNUNET_NO);
   GNUNET_STATISTICS_update (h->stats,
                             "# regex block bytes stored",
-                            size, GNUNET_NO);
+                            size,
+                           GNUNET_NO);
   GNUNET_free (block);
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]