/*
This file is part of GNUnet.
- (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009-2013 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
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.
*/
/**
/**
* Array of our plugins.
*/
-static struct Plugin **plugins;
+static struct Plugin **gns_plugins;
/**
* Size of the 'plugins' array.
plugin = GNUNET_new (struct Plugin);
plugin->api = api;
plugin->library_name = GNUNET_strdup (library_name);
- GNUNET_array_append (plugins, num_plugins, plugin);
+ GNUNET_array_append (gns_plugins, num_plugins, plugin);
}
for (i = 0; i < num_plugins; i++)
{
- plugin = plugins[i];
+ plugin = gns_plugins[i];
GNUNET_break (NULL ==
GNUNET_PLUGIN_unload (plugin->library_name,
plugin->api));
GNUNET_free (plugin->library_name);
GNUNET_free (plugin);
}
- GNUNET_free (plugins);
+ GNUNET_free_non_null (gns_plugins);
+ gns_plugins = NULL;
once = 0;
num_plugins = 0;
}
init ();
for (i = 0; i < num_plugins; i++)
{
- plugin = plugins[i];
+ plugin = gns_plugins[i];
if (NULL != (ret = plugin->api->value_to_string (plugin->api->cls,
type,
data,
init ();
for (i = 0; i < num_plugins; i++)
{
- plugin = plugins[i];
+ plugin = gns_plugins[i];
if (GNUNET_OK == plugin->api->string_to_value (plugin->api->cls,
type,
s,
struct Plugin *plugin;
uint32_t ret;
+ if (0 == strcasecmp (dns_typename,
+ "ANY"))
+ return GNUNET_GNSRECORD_TYPE_ANY;
init ();
for (i = 0; i < num_plugins; i++)
{
- plugin = plugins[i];
+ plugin = gns_plugins[i];
if (UINT32_MAX != (ret = plugin->api->typename_to_number (plugin->api->cls,
dns_typename)))
return ret;
struct Plugin *plugin;
const char * ret;
+ if (GNUNET_GNSRECORD_TYPE_ANY == type)
+ return "ANY";
init ();
for (i = 0; i < num_plugins; i++)
{
- plugin = plugins[i];
+ plugin = gns_plugins[i];
if (NULL != (ret = plugin->api->number_to_typename (plugin->api->cls,
type)))
return ret;