[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32607 - in gnunet/src: gns gnsrecord
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32607 - in gnunet/src: gns gnsrecord |
Date: |
Mon, 10 Mar 2014 11:39:30 +0100 |
Author: florian
Date: 2014-03-10 11:39:30 +0100 (Mon, 10 Mar 2014)
New Revision: 32607
Modified:
gnunet/src/gns/plugin_gnsrecord_gns.c
gnunet/src/gnsrecord/gnsrecord.c
Log:
Rename name_map and plugins from gns so that they are unique in a total c-file
Modified: gnunet/src/gns/plugin_gnsrecord_gns.c
===================================================================
--- gnunet/src/gns/plugin_gnsrecord_gns.c 2014-03-10 10:39:13 UTC (rev
32606)
+++ gnunet/src/gns/plugin_gnsrecord_gns.c 2014-03-10 10:39:30 UTC (rev
32607)
@@ -244,7 +244,7 @@
static struct {
const char *name;
uint32_t number;
-} name_map[] = {
+} gns_name_map[] = {
{ "PKEY", GNUNET_GNSRECORD_TYPE_PKEY },
{ "NICK", GNUNET_GNSRECORD_TYPE_NICK },
{ "LEHO", GNUNET_GNSRECORD_TYPE_LEHO },
@@ -268,10 +268,10 @@
unsigned int i;
i=0;
- while ( (name_map[i].name != NULL) &&
- (0 != strcasecmp (gns_typename, name_map[i].name)) )
+ while ( (gns_name_map[i].name != NULL) &&
+ (0 != strcasecmp (gns_typename, gns_name_map[i].name)) )
i++;
- return name_map[i].number;
+ return gns_name_map[i].number;
}
@@ -289,10 +289,10 @@
unsigned int i;
i=0;
- while ( (name_map[i].name != NULL) &&
- (type != name_map[i].number) )
+ while ( (gns_name_map[i].name != NULL) &&
+ (type != gns_name_map[i].number) )
i++;
- return name_map[i].name;
+ return gns_name_map[i].name;
}
Modified: gnunet/src/gnsrecord/gnsrecord.c
===================================================================
--- gnunet/src/gnsrecord/gnsrecord.c 2014-03-10 10:39:13 UTC (rev 32606)
+++ gnunet/src/gnsrecord/gnsrecord.c 2014-03-10 10:39:30 UTC (rev 32607)
@@ -56,7 +56,7 @@
/**
* Array of our plugins.
*/
-static struct Plugin **plugins;
+static struct Plugin **gns_plugins;
/**
* Size of the 'plugins' array.
@@ -90,7 +90,7 @@
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);
}
@@ -119,15 +119,15 @@
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_non_null (plugins);
- plugins = NULL;
+ GNUNET_free_non_null (gns_plugins);
+ gns_plugins = NULL;
once = 0;
num_plugins = 0;
}
@@ -153,7 +153,7 @@
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,
@@ -186,7 +186,7 @@
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,
@@ -214,7 +214,7 @@
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;
@@ -239,7 +239,7 @@
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32607 - in gnunet/src: gns gnsrecord,
gnunet <=