* can be NULL (if mime-type is not known)
* @param data actual meta-data found
* @param data_len number of bytes in data
- * @return GNUNET_OK to continue extracting / iterating
+ * @return 0 to continue extracting / iterating
*/
static int
add_to_meta_counter (void *cls, const char *plugin_name,
GNUNET_CRYPTO_hash (data, data_len, &key);
cnt = GNUNET_CONTAINER_multihashmap_get (map, &key);
- if (cnt == NULL)
+ if (NULL == cnt)
{
- cnt = GNUNET_malloc (sizeof (struct MetaCounter));
+ cnt = GNUNET_new (struct MetaCounter);
cnt->data = data;
cnt->data_size = data_len;
cnt->plugin_name = plugin_name;
* Iterate over MD entries.
*
* @param md metadata to inspect
- * @param iter function to call on each entry
+ * @param iter function to call on each entry, return 0 to continue to iterate
+ * and 1 to abort iteration in this function (GNU libextractor API!)
* @param iter_cls closure for @a iter
* @return number of entries
*/
EXTRACTOR_MetaDataProcessor iter,
void *iter_cls);
+
/**
* @ingroup metadata
* Get the first MD entry of the given type. Caller