gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r6252 - GNUnet/src/applications/fs/gap


From: gnunet
Subject: [GNUnet-SVN] r6252 - GNUnet/src/applications/fs/gap
Date: Mon, 11 Feb 2008 00:54:54 -0700 (MST)

Author: grothoff
Date: 2008-02-11 00:54:54 -0700 (Mon, 11 Feb 2008)
New Revision: 6252

Modified:
   GNUnet/src/applications/fs/gap/fs.c
   GNUnet/src/applications/fs/gap/fs_dht.c
   GNUnet/src/applications/fs/gap/gap.c
   GNUnet/src/applications/fs/gap/migration.c
   GNUnet/src/applications/fs/gap/pid_table.c
   GNUnet/src/applications/fs/gap/plan.c
   GNUnet/src/applications/fs/gap/querymanager.c
   GNUnet/src/applications/fs/gap/shared.c
   GNUnet/src/applications/fs/gap/test_linear_topology.c
Log:
bugfixes with TONS of debug output still alive -- and still not working entirely

Modified: GNUnet/src/applications/fs/gap/fs.c
===================================================================
--- GNUnet/src/applications/fs/gap/fs.c 2008-02-11 06:22:50 UTC (rev 6251)
+++ GNUnet/src/applications/fs/gap/fs.c 2008-02-11 07:54:54 UTC (rev 6252)
@@ -524,6 +524,9 @@
   GNUNET_PeerIdentity respond_to;
   double preference;
 
+  fprintf(stderr,
+         "FS received P2P query from `%p'\n",
+         sender);
   if (test_load_too_high ())
     {
 #if DEBUG_GAP
@@ -538,6 +541,9 @@
                      "Dropping query from %s, this peer is too busy.\n",
                      sender == NULL ? "localhost" : (char *) &enc);
 #endif
+      fprintf(stderr,
+             "FS dropped P2P query from `%p' due to high load\n",
+             sender);
       return GNUNET_OK;
     }
   size = ntohs (msg->size);
@@ -546,6 +552,8 @@
       GNUNET_GE_BREAK_OP (ectx, 0);
       return GNUNET_SYSERR;     /* malformed query */
     }
+  fprintf(stderr,
+         "FS is processing P2P query\n");
   req = (const P2P_gap_query_MESSAGE *) msg;
   query_count = ntohl (req->number_of_queries);
   if ((query_count == 0) ||
@@ -659,6 +667,9 @@
       GNUNET_GE_BREAK_OP (ectx, 0);
       return GNUNET_SYSERR;     /* invalid! */
     }
+  fprintf(stderr,
+         "FS received P2P response from `%p'\n",
+         sender);
   msg = (const P2P_gap_reply_MESSAGE *) pmsg;
   data_size = size - sizeof (P2P_gap_reply_MESSAGE);
   dblock = (const DBlock *) &msg[1];
@@ -758,7 +769,7 @@
       GNUNET_GE_BREAK (ectx, 0);
       return GNUNET_SYSERR;
     }
-  GNUNET_FS_lock = GNUNET_mutex_create (GNUNET_YES);
+  GNUNET_FS_lock = capi->connection_get_lock(); // GNUNET_mutex_create 
(GNUNET_YES);
   GNUNET_FS_ANONYMITY_init (capi);
   GNUNET_FS_PLAN_init (capi);
   GNUNET_FS_ONDEMAND_init (capi);
@@ -895,7 +906,7 @@
   identity = NULL;
 
 
-  GNUNET_mutex_destroy (GNUNET_FS_lock);
+  // GNUNET_mutex_destroy (GNUNET_FS_lock);
   GNUNET_FS_lock = NULL;
 }
 

Modified: GNUnet/src/applications/fs/gap/fs_dht.c
===================================================================
--- GNUnet/src/applications/fs/gap/fs_dht.c     2008-02-11 06:22:50 UTC (rev 
6251)
+++ GNUnet/src/applications/fs/gap/fs_dht.c     2008-02-11 07:54:54 UTC (rev 
6252)
@@ -32,6 +32,7 @@
 #include "gnunet_protocols.h"
 #include "ecrs_core.h"
 #include "fs.h"
+#include "shared.h"
 #include "fs_dht.h"
 #include "querymanager.h"
 
@@ -62,8 +63,6 @@
 
 static int stat_push_count;
 
-static struct GNUNET_Mutex *lock;
-
 static struct ActiveRequestRecords *records;
 
 /**
@@ -185,11 +184,11 @@
   record->end_time = now + MAX_DHT_DELAY;
   record->handle = dht->get_start (type, query, &response_callback, record);
   record->type = type;
-  GNUNET_mutex_lock (lock);
+  GNUNET_mutex_lock (GNUNET_FS_lock);
   record->next = records;
   records = record;
   purge_old_records (now);
-  GNUNET_mutex_unlock (lock);
+  GNUNET_mutex_unlock (GNUNET_FS_lock);
 }
 
 /**
@@ -250,7 +249,6 @@
 GNUNET_FS_DHT_init (GNUNET_CoreAPIForPlugins * capi)
 {
   coreAPI = capi;
-  lock = GNUNET_mutex_create (GNUNET_YES);
   dht = capi->request_service ("dht");
   sqstore = capi->request_service ("sqstore");
   stats = capi->request_service ("stats");
@@ -289,7 +287,5 @@
     coreAPI->release_service (sqstore);
   sqstore = NULL;
   coreAPI = NULL;
-  GNUNET_mutex_destroy (lock);
-  lock = NULL;
   return 0;
 }

Modified: GNUnet/src/applications/fs/gap/gap.c
===================================================================
--- GNUnet/src/applications/fs/gap/gap.c        2008-02-11 06:22:50 UTC (rev 
6251)
+++ GNUnet/src/applications/fs/gap/gap.c        2008-02-11 07:54:54 UTC (rev 
6252)
@@ -76,9 +76,11 @@
 {
   GNUNET_MessageHeader *msg = cls;
 
+  fprintf(stderr,
+         "!!!!!!!!!!!!!!!!!!!!!Injecting local 
result!!!!!!!!!!!!!!!!!!!!!!!\n");
   coreAPI->p2p_inject_message (NULL,
                                (const char *) msg,
-                               ntohl (msg->size), GNUNET_YES, NULL);
+                               ntohs (msg->size), GNUNET_YES, NULL);
   GNUNET_free (msg);
 }
 
@@ -147,6 +149,8 @@
   msg->reserved = htonl (0);
   msg->expiration = et;
   memcpy (&msg[1], &value[1], size - sizeof (P2P_gap_reply_MESSAGE));
+  fprintf(stderr,
+         "GAP found response, queuing for delayed sending\n");
   GNUNET_cron_add_job (cron,
                        send_delayed,
                        GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
@@ -154,7 +158,6 @@
   ret =
     (ntohl (value->type) ==
      GNUNET_ECRS_BLOCKTYPE_DATA) ? GNUNET_SYSERR : GNUNET_OK;
-  GNUNET_free (msg);
   GNUNET_free_non_null (enc);
   return ret;
 }
@@ -200,11 +203,17 @@
   /* check if table is full (and/or delete old entries!) */
   if ((table[index] != NULL) && (table[index]->next != NULL))
     {
+      fprintf(stderr,
+             "New TTL: %llu + %d = %llu, Old: %llu and %llu\n",
+             now, ttl, now+ttl, table[index]->expiration, 
table[index]->next->expiration);
       /* limit to at most two entries per slot in table */
       if ((now + ttl < table[index]->expiration) &&
           (now + ttl < table[index]->next->expiration))
         {
           /* do not process */
+         fprintf(stderr,
+                 "GAP too busy to create RT entry for query in slot %u\n",
+                 index);
           GNUNET_mutex_unlock (GNUNET_FS_lock);
           return;
         }
@@ -245,6 +254,11 @@
   rl->next = table[index];
   rl->response_target = GNUNET_FS_PT_intern (respond_to);
   table[index] = rl;
+  fprintf(stderr,
+         "GAP creates RT entry `%p' for query from `%u' in slot %u\n",
+         rl,
+         rl->response_target,
+         index);
 
   /* check local data store */
   ret = datastore->get (&queries[0], type, datastore_value_processor, rl);
@@ -294,10 +308,15 @@
   P2P_gap_reply_MESSAGE *msg;
   PID_INDEX rid;
 
-  rid = GNUNET_FS_PT_intern (sender);
   value = 0;
   GNUNET_mutex_lock (GNUNET_FS_lock);
+  rid = GNUNET_FS_PT_intern (sender);
   rl = table[get_table_index (primary_query)];
+  fprintf(stderr,
+         "GAP received response from `%u' - slot: %u == %p\n",
+         rid,
+         get_table_index (primary_query),
+         rl);
   while (rl != NULL)
     {
       if (GNUNET_OK == GNUNET_FS_SHARED_test_valid_new_response (rl,
@@ -314,6 +333,10 @@
           msg->reserved = 0;
           msg->expiration = GNUNET_htonll (expiration);
           memcpy (&msg[1], data, size);
+         fprintf(stderr,
+                 "GAP forwards response from `%u' to `%u'\n",
+                 rid,
+                 rl->response_target);
           coreAPI->unicast (&target,
                             &msg->header,
                             BASE_REPLY_PRIORITY * (1 + rl->value),
@@ -388,6 +411,9 @@
         {
           if (pid == rl->response_target)
             {
+             fprintf(stderr,
+                     "GAP cleans up table due to disconnect from `%u'\n",
+                     pid);
               if (prev == NULL)
                 table[i] = rl->next;
               else
@@ -455,6 +481,7 @@
         }
     }
   GNUNET_free (table);
+  table = NULL;
   GNUNET_GE_ASSERT (coreAPI->ectx,
                     GNUNET_SYSERR !=
                     coreAPI->

Modified: GNUnet/src/applications/fs/gap/migration.c
===================================================================
--- GNUnet/src/applications/fs/gap/migration.c  2008-02-11 06:22:50 UTC (rev 
6251)
+++ GNUnet/src/applications/fs/gap/migration.c  2008-02-11 07:54:54 UTC (rev 
6252)
@@ -34,6 +34,10 @@
 #include "anonymity.h"
 #include "ondemand.h"
 
+#define ENABLE_MIGRATION GNUNET_NO
+
+#if ENABLE_MIGRATION
+
 #define DEBUG_MIGRATION GNUNET_NO
 
 /**
@@ -131,7 +135,7 @@
   unsigned int minDist;
 
   index = coreAPI->connection_compute_index_of_peer (receiver);
-  GNUNET_mutex_lock (lock);
+  GNUNET_mutex_lock (GNUNET_FS_lock);
   now = GNUNET_get_time ();
   entry = -1;
   discard_entry = -1;
@@ -220,14 +224,14 @@
                      GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                      "Migration: no content available for migration.\n");
 #endif
-      GNUNET_mutex_unlock (lock);
+      GNUNET_mutex_unlock (GNUNET_FS_lock);
       return 0;
     }
   value = content[entry].value;
   if (value == NULL)
     {
       GNUNET_GE_ASSERT (NULL, 0);
-      GNUNET_mutex_unlock (lock);
+      GNUNET_mutex_unlock (GNUNET_FS_lock);
       return 0;
     }
   size =
@@ -241,7 +245,7 @@
                      "Migration: available content too big (%u > %u) for 
migration.\n",
                      size, padding);
 #endif
-      GNUNET_mutex_unlock (lock);
+      GNUNET_mutex_unlock (GNUNET_FS_lock);
       return 0;
     }
 #if DEBUG_MIGRATION
@@ -258,7 +262,7 @@
         {
           GNUNET_free_non_null (value);
           content[entry].value = NULL;
-          GNUNET_mutex_unlock (lock);
+          GNUNET_mutex_unlock (GNUNET_FS_lock);
 #if DEBUG_MIGRATION
           GNUNET_GE_LOG (ectx,
                          GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
@@ -277,7 +281,7 @@
     sizeof (GNUNET_DatastoreValue);
   if (size > padding)
     {
-      GNUNET_mutex_unlock (lock);
+      GNUNET_mutex_unlock (GNUNET_FS_lock);
 #if DEBUG_MIGRATION
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
@@ -324,18 +328,20 @@
                      "Migration: not enough cover traffic\n");
 #endif
     }
-  GNUNET_mutex_unlock (lock);
+  GNUNET_mutex_unlock (GNUNET_FS_lock);
   if ((ret > 0) && (stats != NULL))
     stats->change (stat_migration_count, 1);
   GNUNET_GE_BREAK (NULL, ret <= padding);
   return ret;
 }
 
+#endif
+
 void
 GNUNET_FS_MIGRATION_init (GNUNET_CoreAPIForPlugins * capi)
 {
+#if ENABLE_MIGRATION
   coreAPI = capi;
-  lock = GNUNET_mutex_create (GNUNET_NO);
   coreAPI->
     connection_register_send_callback
     (GNUNET_GAP_ESTIMATED_DATA_SIZE,
@@ -352,11 +358,13 @@
         =
         stats->create (gettext_noop ("# on-demand block migration attempts"));
     }
+#endif
 }
 
 void
 GNUNET_FS_MIGRATION_done ()
 {
+#if ENABLE_MIGRATION
   int i;
   coreAPI->
     connection_unregister_send_callback
@@ -374,8 +382,8 @@
       GNUNET_free_non_null (content[i].value);
       content[i].value = NULL;
     }
-  GNUNET_mutex_destroy (lock);
   lock = NULL;
+#endif
 }
 
 /* end of migration.c */

Modified: GNUnet/src/applications/fs/gap/pid_table.c
===================================================================
--- GNUnet/src/applications/fs/gap/pid_table.c  2008-02-11 06:22:50 UTC (rev 
6251)
+++ GNUnet/src/applications/fs/gap/pid_table.c  2008-02-11 07:54:54 UTC (rev 
6252)
@@ -26,6 +26,7 @@
 
 #include "platform.h"
 #include "pid_table.h"
+#include "shared.h"
 
 /**
  * Statistics service.
@@ -55,9 +56,7 @@
 
 static PID_Entry *table;
 
-static struct GNUNET_Mutex *lock;
 
-
 PID_INDEX
 GNUNET_FS_PT_intern (const GNUNET_PeerIdentity * pid)
 {
@@ -67,7 +66,7 @@
   if (pid == NULL)
     return 0;
   zero = size;
-  GNUNET_mutex_lock (lock);
+  GNUNET_mutex_lock (GNUNET_FS_lock);
   for (ret = 1; ret < size; ret++)
     {
       if (0 == memcmp (&pid->hashPubKey,
@@ -80,7 +79,7 @@
               if (table[ret].rc == 1)
                 stats->change (stat_pid_entries, 1);
             }
-          GNUNET_mutex_unlock (lock);
+          GNUNET_mutex_unlock (GNUNET_FS_lock);
           return ret;
         }
       else if ((zero == size) && (table[ret].rc == 0))
@@ -98,7 +97,7 @@
   GNUNET_GE_ASSERT (ectx, ret < size);
   table[ret].id = pid->hashPubKey;
   table[ret].rc = 1;
-  GNUNET_mutex_unlock (lock);
+  GNUNET_mutex_unlock (GNUNET_FS_lock);
   if (stats != NULL)
     {
       stats->change (stat_pid_rc, 1);
@@ -114,7 +113,7 @@
   PID_INDEX id;
   if (count == 0)
     return;
-  GNUNET_mutex_lock (lock);
+  GNUNET_mutex_lock (GNUNET_FS_lock);
   for (i = count - 1; i >= 0; i--)
     {
       id = ids[i];
@@ -124,7 +123,7 @@
       if ((table[id].rc == 0) && (stats != NULL))
         stats->change (stat_pid_entries, -1);
     }
-  GNUNET_mutex_unlock (lock);
+  GNUNET_mutex_unlock (GNUNET_FS_lock);
   if (stats != NULL)
     stats->change (stat_pid_rc, -count);
 }
@@ -134,9 +133,10 @@
 {
   if (id == 0)
     return;
-  GNUNET_mutex_lock (lock);
+  GNUNET_mutex_lock (GNUNET_FS_lock);
   GNUNET_GE_ASSERT (ectx, id < size);
   GNUNET_GE_ASSERT (ectx, table[id].rc > 0);
+  GNUNET_GE_ASSERT (ectx, (delta >= 0) || (table[id].rc >= -delta));
   table[id].rc += delta;
   if (stats != NULL)
     {
@@ -144,7 +144,7 @@
       if (table[id].rc == 0)
         stats->change (stat_pid_entries, -1);
     }
-  GNUNET_mutex_unlock (lock);
+  GNUNET_mutex_unlock (GNUNET_FS_lock);
 }
 
 void
@@ -156,11 +156,11 @@
       GNUNET_GE_BREAK (ectx, 0);
       return;
     }
-  GNUNET_mutex_lock (lock);
+  GNUNET_mutex_lock (GNUNET_FS_lock);
   GNUNET_GE_ASSERT (ectx, id < size);
   GNUNET_GE_ASSERT (ectx, table[id].rc > 0);
   pid->hashPubKey = table[id].id;
-  GNUNET_mutex_unlock (lock);
+  GNUNET_mutex_unlock (GNUNET_FS_lock);
 }
 
 
@@ -180,7 +180,6 @@
         create (gettext_noop
                 ("# total RC of interned peer IDs in pid table"));
     }
-  lock = GNUNET_mutex_create (GNUNET_NO);
 }
 
 
@@ -193,8 +192,6 @@
     GNUNET_GE_ASSERT (ectx, table[i].rc == 0);
   GNUNET_array_grow (table, size, 0);
   stats = NULL;
-  GNUNET_mutex_destroy (lock);
-  lock = NULL;
   ectx = NULL;
 }
 

Modified: GNUnet/src/applications/fs/gap/plan.c
===================================================================
--- GNUnet/src/applications/fs/gap/plan.c       2008-02-11 06:22:50 UTC (rev 
6251)
+++ GNUnet/src/applications/fs/gap/plan.c       2008-02-11 07:54:54 UTC (rev 
6252)
@@ -213,6 +213,7 @@
   clients = cl;
   cl->client = client;
   cl->peer = peer;
+  GNUNET_FS_PT_change_rc(peer, 1);
   return cl;
 }
 
@@ -282,7 +283,7 @@
   entry->request = request;
   entry->prio = prio;
   entry->ttl = GNUNET_FS_HELPER_bound_ttl (ttl, prio);
-
+  entry->list = qpl;
   /* insert entry into request plan entries list */
   entry->plan_entries_next = request->plan_entries;
   request->plan_entries = entry;
@@ -473,6 +474,10 @@
   double prob;
 
   GNUNET_mutex_lock (GNUNET_FS_lock);   /* needed? */
+  fprintf(stderr,
+         "Planning query of %p/%u\n",
+         client, 
+         peer);
   info = clients;
   while ((info != NULL) && ((info->client != client) || (info->peer != peer)))
     info = info->next;
@@ -517,6 +522,12 @@
   if (target_count > total_peers)
     target_count = total_peers;
 
+  fprintf(stderr,
+         "Will adding query from %p/%u to %u peers\n",
+         client,
+         peer,
+         target_count);
+
   /* select target_count peers */
   for (i = 0; i < target_count; i++)
     {
@@ -526,6 +537,11 @@
         {
           if (rank->score > selector)
             {
+             fprintf(stderr,
+                     "Adding query from %p/%u to plan for peer %u\n",
+                     client,
+                     peer,
+                     rank->peer);
               add_request (rank->peer, request, rank->ttl, rank->prio);
               total_score -= rank->score;
               rank->score = 0;  /* mark as used */
@@ -535,6 +551,7 @@
           rank = rank->next;
         }
     }
+
   /* free rpc.rankings list */
   while (rpc.rankings != NULL)
     {
@@ -569,6 +586,8 @@
     + req->bloomfilter_size + (req->key_count - 1) * sizeof (GNUNET_HashCode);
   if (size > available)
     return 0;
+  fprintf(stderr,
+         "Adding request to send buffer (plan.c)\n");
   if ((prio > req->remaining_value) && (req->response_client == NULL))
     prio = req->remaining_value;
   ttl = GNUNET_FS_HELPER_bound_ttl (ttl, prio);
@@ -629,6 +648,10 @@
   if (pl != NULL)
     {
       e = pl->head;
+      if (e != NULL)
+       fprintf(stderr,
+               "Asked to fill buffer for %u - and I have a plan!\n",
+               peer);
       while ((e != NULL) && (padding - off >= sizeof (P2P_gap_query_MESSAGE)))
         {
           ret = try_add_request (e->request,
@@ -657,9 +680,9 @@
                 e->request->plan_entries = e->plan_entries_next;
               else
                 prev->plan_entries_next = e->plan_entries_next;
-              GNUNET_free (e);
               cl = find_or_create_client_entry (e->request->response_client,
                                                 e->request->response_target);
+              GNUNET_free (e);
               hl = find_or_create_history_entry (cl, peer);
               hl->last_request_time = GNUNET_get_time ();
               hl->request_count++;
@@ -827,12 +850,10 @@
             cpos = clients;
           else
             cpos = cprev->next;
+         continue;
         }
-      else
-        {
-          cprev = cpos;
-          cpos = cpos->next;
-        }
+      cprev = cpos;
+      cpos = cpos->next;
     }
   GNUNET_FS_PT_change_rc (pid, -1);
   GNUNET_mutex_unlock (GNUNET_FS_lock);

Modified: GNUnet/src/applications/fs/gap/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/gap/querymanager.c       2008-02-11 06:22:50 UTC 
(rev 6251)
+++ GNUnet/src/applications/fs/gap/querymanager.c       2008-02-11 07:54:54 UTC 
(rev 6252)
@@ -101,6 +101,10 @@
   request->primary_target = GNUNET_FS_PT_intern (target);
   request->response_client = client;
   memcpy (&request->queries[0], query, sizeof (GNUNET_HashCode) * key_count);
+  fprintf(stderr,
+         "Tracking request of type %u from client %p\n", 
+         type,
+         client);
   GNUNET_mutex_lock (GNUNET_FS_lock);
   cl = clients;
   while ((cl != NULL) && (cl->client != client))
@@ -109,6 +113,7 @@
     {
       cl = GNUNET_malloc (sizeof (struct ClientDataList));
       memset (cl, 0, sizeof (struct ClientDataList));
+      cl->client = client;
       cl->next = clients;
       clients = cl;
     }
@@ -224,6 +229,8 @@
   msg->anonymityLevel = htonl (0);      /* unknown */
   msg->expirationTime = GNUNET_htonll (expirationTime);
   memcpy (&msg[1], data, size);
+  fprintf(stderr,
+         "Forwarding response to client\n");
   coreAPI->cs_send_to_client (client,
                               &msg->header,
                               (rl->type != GNUNET_ECRS_BLOCKTYPE_DATA)
@@ -435,6 +442,8 @@
                     GNUNET_SYSERR !=
                     coreAPI->
                     cs_exit_handler_unregister (&handle_client_exit));
+  while (clients != NULL)
+    handle_client_exit(clients->client);    
   return 0;
 }
 

Modified: GNUnet/src/applications/fs/gap/shared.c
===================================================================
--- GNUnet/src/applications/fs/gap/shared.c     2008-02-11 06:22:50 UTC (rev 
6251)
+++ GNUnet/src/applications/fs/gap/shared.c     2008-02-11 07:54:54 UTC (rev 
6252)
@@ -91,7 +91,11 @@
   /* check that type and primary key match */
   if ((rl->type != ntohl (data->type)) ||
       (0 != memcmp (primary_key, &rl->queries[0], sizeof (GNUNET_HashCode))))
-    return GNUNET_NO;
+    {
+      fprintf(stderr,
+             "Response does not match request\n");
+      return GNUNET_NO;
+    }
 
   /* check that content matches query */
   ret = GNUNET_EC_is_block_applicable_for_query (rl->type,
@@ -101,19 +105,31 @@
                                                  rl->key_count,
                                                  &rl->queries[0]);
   if (ret != GNUNET_OK)
-    return ret;
+    {
+      fprintf(stderr,
+             "Response does not match request (EC)\n");
+      return ret;
+    }
 
   /* check that this is a new response */
   GNUNET_hash (data, size, hc);
   GNUNET_FS_HELPER_mingle_hash (hc, rl->bloomfilter_mutator, &m);
   if ((rl->bloomfilter != NULL) &&
       (GNUNET_YES == GNUNET_bloomfilter_test (rl->bloomfilter, &m)))
-    return GNUNET_NO;           /* not useful */
+    {
+      fprintf(stderr,
+             "Response does not match request (BF)\n");
+      return GNUNET_NO;           /* not useful */
+    }
   seen = rl->responses;
   while (seen != NULL)
     {
       if (0 == memcmp (hc, &seen->hash, sizeof (GNUNET_HashCode)))
-        return GNUNET_NO;
+       {
+         fprintf(stderr,
+                 "Response does not match request (seen)\n");
+         return GNUNET_NO;
+       }
       seen = seen->next;
     }
   return GNUNET_OK;

Modified: GNUnet/src/applications/fs/gap/test_linear_topology.c
===================================================================
--- GNUnet/src/applications/fs/gap/test_linear_topology.c       2008-02-11 
06:22:50 UTC (rev 6251)
+++ GNUnet/src/applications/fs/gap/test_linear_topology.c       2008-02-11 
07:54:54 UTC (rev 6252)
@@ -33,11 +33,11 @@
 #include "gnunet_stats_lib.h"
 
 
-#define START_PEERS 1
+#define START_PEERS 0
 
-#define PEER_COUNT 4
+#define PEER_COUNT 2
 
-#define SIZE 1024 * 1024 * 2
+#define SIZE 1024 * 32 * 2
 
 static struct GNUNET_GE_Context *ectx;
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]