gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r11535 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r11535 - gnunet/src/fs
Date: Thu, 27 May 2010 14:15:12 +0200

Author: grothoff
Date: 2010-05-27 14:15:12 +0200 (Thu, 27 May 2010)
New Revision: 11535

Modified:
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/test_gnunet_service_fs_migration.c
   gnunet/src/fs/test_gnunet_service_fs_migration_data.conf
Log:
logging, minor fixes

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2010-05-27 12:14:51 UTC (rev 11534)
+++ gnunet/src/fs/gnunet-service-fs.c   2010-05-27 12:15:12 UTC (rev 11535)
@@ -44,7 +44,7 @@
 #include "gnunet-service-fs_indexing.h"
 #include "fs.h"
 
-#define DEBUG_FS GNUNET_NO
+#define DEBUG_FS GNUNET_YES
 
 /**
  * Maximum number of outgoing messages we queue per peer.
@@ -842,6 +842,11 @@
     }
   if (msize == 0)
     return GNUNET_YES; /* no content available */
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Trying to migrate `%s' (%u bytes) to `%s'\n",
+             GNUNET_h2s (&mb->query),
+             msize,
+             GNUNET_i2s (&cppid));
   cp->cth 
     = GNUNET_CORE_notify_transmit_ready (core,
                                         0, GNUNET_TIME_UNIT_FOREVER_REL,
@@ -1500,9 +1505,26 @@
                  size -= sizeof (migm);
                  memcpy (&cbuf[msize], &mb[1], mb->size);
                  msize += mb->size;
-                 size -= mb->size;               
+                 size -= mb->size;
+#if DEBUG_FS
+                 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                             "Pushing migration block `%s' (%u bytes) to 
`%s'\n",
+                             GNUNET_h2s (&mb->query),
+                             mb->size,
+                             GNUNET_i2s (&pid));
+#endif   
                  break;
                }
+             else
+               {
+#if DEBUG_FS
+                 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                             "Migration block `%s' (%u bytes) is not on 
migration list for peer `%s'\n",
+                             GNUNET_h2s (&mb->query),
+                             mb->size,
+                             GNUNET_i2s (&pid));
+#endif   
+               }
            }
          if ( (mb->used_targets >= MIGRATION_TARGET_COUNT) ||
               (mb->used_targets >= GNUNET_CONTAINER_multihashmap_size 
(connected_peers)) )
@@ -1515,7 +1537,7 @@
                          &pid.hashPubKey,
                          cp);
     }
-#if DEBUG_FS > 3
+#if DEBUG_FS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Transmitting %u bytes to peer %u\n",
              msize,

Modified: gnunet/src/fs/test_gnunet_service_fs_migration.c
===================================================================
--- gnunet/src/fs/test_gnunet_service_fs_migration.c    2010-05-27 12:14:51 UTC 
(rev 11534)
+++ gnunet/src/fs/test_gnunet_service_fs_migration.c    2010-05-27 12:15:12 UTC 
(rev 11535)
@@ -37,12 +37,12 @@
 /**
  * How long until we give up on transmitting the message?
  */
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 600)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
 
 /**
  * How long do we give the peers for content migration?
  */
-#define MIGRATION_DELAY GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 60)
+#define MIGRATION_DELAY GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 5)
 
 #define SEED 42
 
@@ -236,7 +236,7 @@
     GNUNET_GETOPT_OPTION_END
   };
 
-  GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-lib/");
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-service-fs-migration/");
   GNUNET_log_setup ("test_gnunet_service_fs_migration", 
 #if VERBOSE
                    "DEBUG",
@@ -247,7 +247,7 @@
   GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1,
                       argvx, "test-gnunet-service-fs-migration",
                      "nohelp", options, &run, NULL);
-  GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-lib/");
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-service-fs-migration/");
   return ok;
 }
 

Modified: gnunet/src/fs/test_gnunet_service_fs_migration_data.conf
===================================================================
--- gnunet/src/fs/test_gnunet_service_fs_migration_data.conf    2010-05-27 
12:14:51 UTC (rev 11534)
+++ gnunet/src/fs/test_gnunet_service_fs_migration_data.conf    2010-05-27 
12:15:12 UTC (rev 11535)
@@ -42,7 +42,7 @@
 #TOTAL_QUOTA_OUT = 9321
 TOTAL_QUOTA_IN = 3932160
 TOTAL_QUOTA_OUT = 3932160
-#DEBUG = YES
+DEBUG = YES
 #PREFIX = valgrind --tool=memcheck --leak-check=yes
 
 [fs]
@@ -50,7 +50,7 @@
 HOSTNAME = localhost
 #OPTIONS = -L DEBUG
 ACTIVEMIGRATION = YES
-#DEBUG = YES
+DEBUG = YES
 #PREFIX = valgrind --tool=memcheck --leak-check=yes 
 #PREFIX = xterm -e gdb -x cmd --args 
 




reply via email to

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