From 0e8aee71ffec6d52c3e3927a41b1058dbb3290ef Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 9 Nov 2012 14:06:53 +0000 Subject: [PATCH] - don't reject cached blocks --- src/mesh/mesh_block_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesh/mesh_block_lib.c b/src/mesh/mesh_block_lib.c index a4e6c73b5..03a30723a 100644 --- a/src/mesh/mesh_block_lib.c +++ b/src/mesh/mesh_block_lib.c @@ -190,7 +190,9 @@ GNUNET_MESH_regex_block_iterate (const struct MeshRegexBlock *block, aux = &aux[n_token]; // Skip edge token } // The total size should be exactly the size of (regex + all edges) blocks - if (offset == size) + // If size == -1, block is from cache and therefore previously checked and + // assumed correct. + if (offset == size || (unsigned int) -1 == size) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "* Block processed, END OK\n"); -- 2.25.1