[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5965 - GNUnet/src/applications/dht/module
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5965 - GNUnet/src/applications/dht/module |
Date: |
Wed, 19 Dec 2007 10:49:28 -0700 (MST) |
Author: grothoff
Date: 2007-12-19 10:49:28 -0700 (Wed, 19 Dec 2007)
New Revision: 5965
Modified:
GNUnet/src/applications/dht/module/routing.c
Log:
fix
Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c 2007-12-19 01:20:11 UTC
(rev 5964)
+++ GNUnet/src/applications/dht/module/routing.c 2007-12-19 17:49:28 UTC
(rev 5965)
@@ -229,7 +229,7 @@
if (hop_count > (diameter + 1) * 2)
return 0;
target_count =
- target_replication / (target_replication * hop_count + diameter);
+ target_replication / (target_replication * (hop_count+1) + diameter);
target_value = 0;
while (target_value < target_count)
target_value++;
@@ -533,6 +533,8 @@
hop_count = ntohl (get->hop_count);
target_value = get_forward_count (hop_count, GET_TRIES);
aget.hop_count = htonl (1 + hop_count);
+ if (target_value > GET_TRIES)
+ target_value = GET_TRIES;
for (i = 0; i < target_value; i++)
{
if (GNUNET_OK !=
@@ -599,7 +601,8 @@
aput = GNUNET_malloc (ntohs (msg->size));
memcpy (aput, put, ntohs (msg->size));
aput->hop_count = htons (hop_count + 1);
-
+ if (target_value > PUT_TRIES)
+ target_value = PUT_TRIES;
j = 0;
for (i = 0; i < target_value; i++)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5965 - GNUnet/src/applications/dht/module,
gnunet <=