aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amat.us>2017-10-01 17:19:05 -0500
committerDavid Barksdale <amatus@amat.us>2017-10-01 17:31:02 -0500
commit0f225ed0304398350d7b51a2567b2dc595476f31 (patch)
tree8c05cfd4bd5df20200e21ae75a32f83623e13889
parent60374f075270f8489e430c2967d36023f26ea2ef (diff)
downloadgnunet-0f225ed0304398350d7b51a2567b2dc595476f31.tar.gz
gnunet-0f225ed0304398350d7b51a2567b2dc595476f31.zip
Support filter-size in fs block plugin
This should fix some assertions failures I'm seeing in the DHT service.
-rw-r--r--src/fs/plugin_block_fs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/fs/plugin_block_fs.c b/src/fs/plugin_block_fs.c
index 902519f15..c762835ce 100644
--- a/src/fs/plugin_block_fs.c
+++ b/src/fs/plugin_block_fs.c
@@ -71,17 +71,22 @@ block_plugin_fs_create_group (void *cls,
71 return NULL; 71 return NULL;
72 case GNUNET_BLOCK_TYPE_FS_UBLOCK: 72 case GNUNET_BLOCK_TYPE_FS_UBLOCK:
73 guard = va_arg (va, const char *); 73 guard = va_arg (va, const char *);
74 if (0 != strcmp (guard, 74 if (0 == strcmp (guard,
75 "seen-set-size")) 75 "seen-set-size"))
76 { 76 {
77 /* va-args invalid! bad bug, complain! */ 77 size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int),
78 GNUNET_break (0); 78 BLOOMFILTER_K);
79 size = 8; 79 }
80 else if (0 == strcmp (guard,
81 "filter-size"))
82 {
83 size = va_arg (va, unsigned int);
80 } 84 }
81 else 85 else
82 { 86 {
83 size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int), 87 /* va-args invalid! bad bug, complain! */
84 BLOOMFILTER_K); 88 GNUNET_break (0);
89 size = 8;
85 } 90 }
86 if (0 == size) 91 if (0 == size)
87 size = raw_data_size; /* not for us to determine, use what we got! */ 92 size = raw_data_size; /* not for us to determine, use what we got! */