/*
This file is part of GNUnet.
- Copyright (C) 2010 GNUnet e.V.
+ Copyright (C) 2010, 2017 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
{
struct GNUNET_HashCode m;
- GNUNET_CRYPTO_hash (&mingle_number, sizeof (uint32_t), &m);
- GNUNET_CRYPTO_hash_xor (&m, in, hc);
+ GNUNET_CRYPTO_hash (&mingle_number,
+ sizeof (uint32_t),
+ &m);
+ GNUNET_CRYPTO_hash_xor (&m,
+ in,
+ hc);
}
plugin = GNUNET_new (struct Plugin);
plugin->api = api;
plugin->library_name = GNUNET_strdup (library_name);
- GNUNET_array_append (ctx->plugins, ctx->num_plugins, plugin);
+ GNUNET_array_append (ctx->plugins,
+ ctx->num_plugins,
+ plugin);
}
ctx = GNUNET_new (struct GNUNET_BLOCK_Context);
ctx->cfg = cfg;
- GNUNET_PLUGIN_load_all ("libgnunet_plugin_block_", NULL, &add_plugin, ctx);
+ GNUNET_PLUGIN_load_all ("libgnunet_plugin_block_",
+ (void *) cfg,
+ &add_plugin,
+ ctx);
return ctx;
}
{
plugin = ctx->plugins[i];
GNUNET_break (NULL ==
- GNUNET_PLUGIN_unload (plugin->library_name, plugin->api));
+ GNUNET_PLUGIN_unload (plugin->library_name,
+ plugin->api));
GNUNET_free (plugin->library_name);
GNUNET_free (plugin);
}
enum GNUNET_BLOCK_Type type)
{
struct Plugin *plugin;
- unsigned int i;
unsigned int j;
- for (i = 0; i < ctx->num_plugins; i++)
+ for (unsigned i = 0; i < ctx->num_plugins; i++)
{
plugin = ctx->plugins[i];
j = 0;
type);
if (NULL == plugin->create_group)
return NULL;
- va_start (ap, raw_data_size);
+ va_start (ap,
+ raw_data_size);
bg = plugin->create_group (plugin->cls,
type,
nonce,
if (NULL == plugin)
return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
return plugin->evaluate (plugin->cls,
+ ctx,
type,
group,
eo,
if (plugin == NULL)
return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
- return plugin->get_key (plugin->cls, type, block, block_size, key);
+ return plugin->get_key (plugin->cls,
+ type,
+ block,
+ block_size,
+ key);
}