tolerate additional IPv4 address now available for gnunet.org
[oweals/gnunet.git] / src / fs / plugin_block_fs.c
index b6749b4183be10059d65941fa5a27ecbd6f577f1..f0df52c99738e2da75300b3ec8ce89958c3e5e62 100644 (file)
@@ -2,20 +2,20 @@
      This file is part of GNUnet
      Copyright (C) 2010, 2013 GNUnet e.V.
 
-     GNUnet is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
+     GNUnet is free software: you can redistribute it and/or modify it
+     under the terms of the GNU Affero General Public License as published
+     by the Free Software Foundation, either version 3 of the License,
+     or (at your option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
+     Affero General Public License for more details.
+    
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-     You should have received a copy of the GNU General Public License
-     along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-     Boston, MA 02110-1301, USA.
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 
 /**
@@ -71,17 +71,22 @@ block_plugin_fs_create_group (void *cls,
     return NULL;
   case GNUNET_BLOCK_TYPE_FS_UBLOCK:
     guard = va_arg (va, const char *);
-    if (0 != strcmp (guard,
+    if (0 == strcmp (guard,
                      "seen-set-size"))
     {
-      /* va-args invalid! bad bug, complain! */
-      GNUNET_break (0);
-      size = 8;
+      size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int),
+                                                          BLOOMFILTER_K);
+    }
+    else if (0 == strcmp (guard,
+                          "filter-size"))
+    {
+      size = va_arg (va, unsigned int);
     }
     else
     {
-      size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int),
-                                                          BLOOMFILTER_K);
+      /* va-args invalid! bad bug, complain! */
+      GNUNET_break (0);
+      size = 8;
     }
     if (0 == size)
       size = raw_data_size; /* not for us to determine, use what we got! */
@@ -109,6 +114,7 @@ block_plugin_fs_create_group (void *cls,
  * be done with the #GNUNET_BLOCK_get_key() function.
  *
  * @param cls closure
+ * @param ctx block context
  * @param type block type
  * @param bg group to use for evaluation
  * @param eo control flags
@@ -121,6 +127,7 @@ block_plugin_fs_create_group (void *cls,
  */
 static enum GNUNET_BLOCK_EvaluationResult
 block_plugin_fs_evaluate (void *cls,
+                          struct GNUNET_BLOCK_Context *ctx,
                           enum GNUNET_BLOCK_Type type,
                           struct GNUNET_BLOCK_Group *bg,
                           enum GNUNET_BLOCK_EvaluationOptions eo,
@@ -274,7 +281,7 @@ libgnunet_plugin_block_fs_init (void *cls)
 void *
 libgnunet_plugin_block_fs_done (void *cls)
 {
-  struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
+  struct GNUNET_BLOCK_PluginFunctions *api = cls;
 
   GNUNET_free (api);
   return NULL;