[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24361 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24361 - gnunet/src/fs |
Date: |
Wed, 17 Oct 2012 16:59:27 +0200 |
Author: grothoff
Date: 2012-10-17 16:59:27 +0200 (Wed, 17 Oct 2012)
New Revision: 24361
Modified:
gnunet/src/fs/gnunet-service-fs_pe.c
Log:
-fixing plan_map over-eager interning as reported by mwachs
Modified: gnunet/src/fs/gnunet-service-fs_pe.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pe.c 2012-10-17 14:48:06 UTC (rev
24360)
+++ gnunet/src/fs/gnunet-service-fs_pe.c 2012-10-17 14:59:27 UTC (rev
24361)
@@ -220,6 +220,12 @@
/**
* Return the query (key in the plan_map) for the given request plan.
+ * Note that this key may change as there can be multiple pending
+ * requests for the same key and we just return _one_ of them; this
+ * particular one might complete while another one might still be
+ * active, hence the lifetime of the returned hash code is NOT
+ * necessarily identical to that of the 'struct GSF_RequestPlan'
+ * given.
*
* @param rp a request plan
* @return the associated query
@@ -572,7 +578,7 @@
if (NULL == pp)
{
pp = GNUNET_malloc (sizeof (struct PeerPlan));
- pp->plan_map = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_YES);
+ pp->plan_map = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO);
pp->priority_heap =
GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MAX);
pp->delay_heap =
@@ -742,8 +748,7 @@
plan_count--;
GNUNET_break (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (rp->pp->plan_map,
-
&GSF_pending_request_get_data_
-
(rpr->prl->pr)->query,
+ get_rp_key (rp),
rp));
GNUNET_free (rp);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24361 - gnunet/src/fs,
gnunet <=