Fix for #4553
[oweals/gnunet.git] / src / regex / test_regex_iterate_api.c
index cf7ee2298264bcb7fc48eb11c63e40d03c91bd02..363c27147fa32f664953396086e82ede83a5425d 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2012 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012 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
@@ -14,8 +14,8 @@
 
      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., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file regex/test_regex_iterate_api.c
@@ -26,6 +26,7 @@
 #include <time.h>
 #include "platform.h"
 #include "regex_internal_lib.h"
+#include "regex_block_lib.h"
 #include "regex_internal.h"
 
 /**
@@ -59,9 +60,10 @@ struct RegexStringPair
 
 
 static void
-key_iterator (void *cls, const struct GNUNET_HashCode *key, const char *proof,
+key_iterator (void *cls, const struct GNUNET_HashCode *key,
+             const char *proof,
               int accepting, unsigned int num_edges,
-              const struct REGEX_INTERNAL_Edge *edges)
+              const struct REGEX_BLOCK_Edge *edges)
 {
   unsigned int i;
   struct IteratorContext *ctx = cls;
@@ -101,16 +103,16 @@ key_iterator (void *cls, const struct GNUNET_HashCode *key, const char *proof,
       ctx->match_count++;
   }
 
-  if (GNUNET_OK != REGEX_INTERNAL_check_proof (proof, key))
+  if (GNUNET_OK != REGEX_BLOCK_check_proof (proof, strlen (proof), key))
   {
     ctx->error++;
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Proof check failed: proof: %s key: %s\n", proof, state_id);
   }
-
   GNUNET_free (state_id);
 }
 
+
 int
 main (int argc, char *argv[])
 {