- fix connection.c
[oweals/gnunet.git] / src / regex / test_regex_iterate_api.c
index fa94c58ab1e5df2616d14a68f7c7bc12644096e0..a86295abf8199e61ba8ce59918552cf6848f4262 100644 (file)
@@ -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,7 +60,8 @@ 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_BLOCK_Edge *edges)
 {
@@ -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[])
 {