print active/inactive information
[oweals/gnunet.git] / src / regex / plugin_block_regex.c
index 4dda893c9642b4a002056039910bf92df9a6697f..43ebe7b3237568e789c863119c1262be10907144 100644 (file)
@@ -174,7 +174,7 @@ evaluate_block_regex_accept (void *cls, enum GNUNET_BLOCK_Type type,
   if (ntohl (rba->purpose.size) !=
       sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
       sizeof (struct GNUNET_TIME_AbsoluteNBO) +
-      sizeof (struct GNUNET_HashCode)) 
+      sizeof (struct GNUNET_HashCode))
   {
     GNUNET_break_op(0);
     return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
@@ -184,12 +184,12 @@ evaluate_block_regex_accept (void *cls, enum GNUNET_BLOCK_Type type,
     /* technically invalid, but can happen without an error, so
        we're nice by reporting it as a 'duplicate' */
     return GNUNET_BLOCK_EVALUATION_OK_DUPLICATE;
-  }  
+  }
   if (GNUNET_OK !=
-      GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT,
+      GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT,
                                &rba->purpose,
                                &rba->signature,
-                               &rba->public_key))
+                               &rba->peer.public_key))
   {
     GNUNET_break_op(0);
     return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
@@ -270,9 +270,9 @@ block_plugin_regex_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
  * @param cls closure
  * @param type block type
  * @param block block to get the key for
- * @param block_size number of bytes in block
+ * @param block_size number of bytes in @a block
  * @param key set to the key (query) for the given block
- * @return GNUNET_OK on success, GNUNET_SYSERR if type not supported
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR if type not supported
  *         (or if extracting a key from a block of this type does not work)
  */
 static int
@@ -320,7 +320,7 @@ libgnunet_plugin_block_regex_init (void *cls)
   };
   struct GNUNET_BLOCK_PluginFunctions *api;
 
-  api = GNUNET_malloc (sizeof (struct GNUNET_BLOCK_PluginFunctions));
+  api = GNUNET_new (struct GNUNET_BLOCK_PluginFunctions);
   api->evaluate = &block_plugin_regex_evaluate;
   api->get_key = &block_plugin_regex_get_key;
   api->types = types;