[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14744 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14744 - gnunet/src/fs |
Date: |
Sun, 27 Mar 2011 14:16:22 +0200 |
Author: grothoff
Date: 2011-03-27 14:16:22 +0200 (Sun, 27 Mar 2011)
New Revision: 14744
Modified:
gnunet/src/fs/gnunet-service-fs_push.c
gnunet/src/fs/test_gnunet_service_fs_migration_data.conf
Log:
ugh
Modified: gnunet/src/fs/gnunet-service-fs_push.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_push.c 2011-03-27 11:59:23 UTC (rev
14743)
+++ gnunet/src/fs/gnunet-service-fs_push.c 2011-03-27 12:16:22 UTC (rev
14744)
@@ -226,6 +226,11 @@
GNUNET_assert (msize <= buf_size);
memcpy (buf, msg, msize);
GNUNET_free (msg);
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Pushing %u bytes to another peer\n",
+ msize);
+#endif
find_content (peer);
return msize;
}
@@ -254,7 +259,7 @@
msg = GNUNET_malloc (msize);
msg->header.type = htons (42);
msg->header.size = htons (msize);
-
+ GNUNET_break (0);
memcpy (&msg[1],
&block[1],
block->size);
@@ -375,7 +380,17 @@
if (NULL == best)
{
if (mig_size < MAX_MIGRATION_QUEUE)
- return; /* will fill up eventually... */
+ {
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "No content found for pushing, waiting for queue to
fill\n");
+#endif
+ return; /* will fill up eventually... */
+ }
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "No suitable content found, purging content from full
queue\n");
+#endif
/* failed to find migration target AND
queue is full, purge most-forwarded
block from queue to make room for more */
@@ -392,10 +407,14 @@
pos = pos->next;
}
GNUNET_assert (NULL != best);
- delete_migration_block (best);
+ delete_migration_block (best);
consider_gathering ();
return;
}
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Preparing to push best content to peer\n");
+#endif
transmit_content (mrp, best);
}
@@ -517,6 +536,10 @@
{
if (NULL == pos->th)
{
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Preparing to push best content to peer\n");
+#endif
if (GNUNET_YES == transmit_content (pos, mb))
break; /* 'mb' was freed! */
}
Modified: gnunet/src/fs/test_gnunet_service_fs_migration_data.conf
===================================================================
--- gnunet/src/fs/test_gnunet_service_fs_migration_data.conf 2011-03-27
11:59:23 UTC (rev 14743)
+++ gnunet/src/fs/test_gnunet_service_fs_migration_data.conf 2011-03-27
12:16:22 UTC (rev 14744)
@@ -53,7 +53,7 @@
ACTIVEMIGRATION = YES
CONTENT_CACHING = YES
CONTENT_PUSHING = YES
-#DEBUG = YES
+DEBUG = YES
#PREFIX = valgrind --tool=memcheck --leak-check=yes
#PREFIX = xterm -e gdb -x cmd --args
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14744 - gnunet/src/fs,
gnunet <=