[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6361 - GNUnet/src/applications/fs/gap
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6361 - GNUnet/src/applications/fs/gap |
Date: |
Sun, 17 Feb 2008 21:59:09 -0700 (MST) |
Author: grothoff
Date: 2008-02-17 21:59:09 -0700 (Sun, 17 Feb 2008)
New Revision: 6361
Modified:
GNUnet/src/applications/fs/gap/gap.c
Log:
re-do local gets on refresh
Modified: GNUnet/src/applications/fs/gap/gap.c
===================================================================
--- GNUnet/src/applications/fs/gap/gap.c 2008-02-18 04:43:41 UTC (rev
6360)
+++ GNUnet/src/applications/fs/gap/gap.c 2008-02-18 04:59:09 UTC (rev
6361)
@@ -256,9 +256,11 @@
{
/* ignore */
GNUNET_FS_PT_change_rc (peer, -1);
- GNUNET_mutex_unlock (GNUNET_FS_lock);
if (stats != NULL)
stats->change (stat_gap_query_dropped_redundant, 1);
+ if (type != GNUNET_ECRS_BLOCKTYPE_DATA)
+ goto CHECK; /* we may have more local results! */
+ GNUNET_mutex_unlock (GNUNET_FS_lock);
return;
}
if (stats != NULL)
@@ -277,6 +279,8 @@
bloomfilter_data, filter_size);
}
GNUNET_FS_PT_change_rc (peer, -1);
+ if (type != GNUNET_ECRS_BLOCKTYPE_DATA)
+ goto CHECK; /* we may have more local results! */
GNUNET_mutex_unlock (GNUNET_FS_lock);
return;
}
@@ -293,6 +297,8 @@
else
rl->bloomfilter = NULL;
GNUNET_FS_PT_change_rc (peer, -1);
+ if (type != GNUNET_ECRS_BLOCKTYPE_DATA)
+ goto CHECK; /* we may have more local results! */
GNUNET_mutex_unlock (GNUNET_FS_lock);
return;
}
@@ -352,7 +358,10 @@
rl->response_target = peer;
rl->policy = policy;
table[index] = rl;
+ if (stats != NULL)
+ stats->change (stat_gap_query_routed, 1);
/* check local data store */
+ CHECK:
cls.request = rl;
cls.iteration_count = 0;
cls.result_count = 0;
@@ -364,11 +373,10 @@
/* if not found or not unique, forward */
if (((ret != 1) || (type != GNUNET_ECRS_BLOCKTYPE_DATA)) &&
- (0 != (policy & GNUNET_FS_RoutingPolicy_FORWARD)))
+ (0 != (policy & GNUNET_FS_RoutingPolicy_FORWARD)) &&
+ (rl->plan_entries == NULL) )
GNUNET_FS_PLAN_request (NULL, peer, rl);
GNUNET_mutex_unlock (GNUNET_FS_lock);
- if (stats != NULL)
- stats->change (stat_gap_query_routed, 1);
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6361 - GNUnet/src/applications/fs/gap,
gnunet <=