[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13173 - gnunet/src/block
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13173 - gnunet/src/block |
Date: |
Wed, 6 Oct 2010 11:27:41 +0200 |
Author: nevans
Date: 2010-10-06 11:27:41 +0200 (Wed, 06 Oct 2010)
New Revision: 13173
Modified:
gnunet/src/block/plugin_block_dht.c
gnunet/src/block/plugin_block_template.c
gnunet/src/block/plugin_block_test.c
Log:
mis-named functions (this means that SOMEONE doesn't have exhaustive testcases)
Modified: gnunet/src/block/plugin_block_dht.c
===================================================================
--- gnunet/src/block/plugin_block_dht.c 2010-10-06 09:27:09 UTC (rev 13172)
+++ gnunet/src/block/plugin_block_dht.c 2010-10-06 09:27:41 UTC (rev 13173)
@@ -42,7 +42,7 @@
* @param query original query (hash)
* @param bf pointer to bloom filter associated with query; possibly updated
(!)
* @param bf_mutator mutation value for bf
- * @param xquery extrended query data (can be NULL, depending on type)
+ * @param xquery extended query data (can be NULL, depending on type)
* @param xquery_size number of bytes in xquery
* @param reply_block response to validate
* @param reply_block_size number of bytes in reply block
@@ -59,14 +59,18 @@
const void *reply_block,
size_t reply_block_size)
{
- if (type != GNUNET_BLOCK_TYPE_DHT_HELLO)
+ switch (type)
+ {
+ case GNUNET_BLOCK_TYPE_DHT_HELLO:
+ if (xquery_size != 0)
+ return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID;
+ if (reply_block_size == 0)
+ return GNUNET_BLOCK_EVALUATION_REQUEST_VALID;
+ GNUNET_break (NULL == *bf);
+ return GNUNET_BLOCK_EVALUATION_OK_LAST;
+ default:
return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
- if (xquery_size != 0)
- return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID;
- if (reply_block_size == 0)
- return GNUNET_BLOCK_EVALUATION_REQUEST_VALID;
- GNUNET_break (NULL == *bf);
- return GNUNET_BLOCK_EVALUATION_OK_LAST;
+ }
}
@@ -131,7 +135,7 @@
* Entry point for the plugin.
*/
void *
-gnunet_plugin_block_dht_init (void *cls)
+libgnunet_plugin_block_dht_init (void *cls)
{
static enum GNUNET_BLOCK_Type types[] =
{
@@ -152,7 +156,7 @@
* Exit point from the plugin.
*/
void *
-gnunet_plugin_block_dht_done (void *cls)
+libgnunet_plugin_block_dht_done (void *cls)
{
struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
Modified: gnunet/src/block/plugin_block_template.c
===================================================================
--- gnunet/src/block/plugin_block_template.c 2010-10-06 09:27:09 UTC (rev
13172)
+++ gnunet/src/block/plugin_block_template.c 2010-10-06 09:27:41 UTC (rev
13173)
@@ -86,7 +86,7 @@
* Entry point for the plugin.
*/
void *
-gnunet_plugin_block_template_init (void *cls)
+libgnunet_plugin_block_template_init (void *cls)
{
static enum GNUNET_BLOCK_Type types[] =
{
@@ -107,7 +107,7 @@
* Exit point from the plugin.
*/
void *
-gnunet_plugin_block_template_done (void *cls)
+libgnunet_plugin_block_template_done (void *cls)
{
struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
Modified: gnunet/src/block/plugin_block_test.c
===================================================================
--- gnunet/src/block/plugin_block_test.c 2010-10-06 09:27:09 UTC (rev
13172)
+++ gnunet/src/block/plugin_block_test.c 2010-10-06 09:27:41 UTC (rev
13173)
@@ -122,7 +122,7 @@
* Entry point for the plugin.
*/
void *
-gnunet_plugin_block_test_init (void *cls)
+libgnunet_plugin_block_test_init (void *cls)
{
static enum GNUNET_BLOCK_Type types[] =
{
@@ -143,7 +143,7 @@
* Exit point from the plugin.
*/
void *
-gnunet_plugin_block_test_done (void *cls)
+libgnunet_plugin_block_test_done (void *cls)
{
struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13173 - gnunet/src/block,
gnunet <=