[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r18688 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r18688 - gnunet/src/fs |
Date: |
Mon, 19 Dec 2011 15:10:15 +0100 |
Author: grothoff
Date: 2011-12-19 15:10:15 +0100 (Mon, 19 Dec 2011)
New Revision: 18688
Modified:
gnunet/src/fs/gnunet-service-fs_cp.c
gnunet/src/fs/gnunet-service-fs_pr.c
gnunet/src/fs/gnunet-service-fs_pr.h
Log:
actually limit FS memory consumption by limiting how many requests we track
from other peers (respective GSF-option had not been set; new code also inverts
the meaning of the bit, so it does not have to be set for peers but rather is
now set for clients to excempt them from the limitation)
Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c 2011-12-19 14:02:25 UTC (rev
18687)
+++ gnunet/src/fs/gnunet-service-fs_cp.c 2011-12-19 14:10:15 UTC (rev
18688)
@@ -1231,7 +1231,7 @@
(0 !=
(bm & GET_MESSAGE_BIT_TRANSMIT_TO)) ? ((const struct GNUNET_PeerIdentity
*) &opt[bits++]) : NULL;
- options = 0;
+ options = GSF_PRO_DEFAULTS;
spid = 0;
if ((GNUNET_LOAD_get_load (cp->ppd.transmission_delay) > 3 * (1 + priority))
|| (GNUNET_LOAD_get_average (cp->ppd.transmission_delay) >
Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c 2011-12-19 14:02:25 UTC (rev
18687)
+++ gnunet/src/fs/gnunet-service-fs_pr.c 2011-12-19 14:10:15 UTC (rev
18688)
@@ -345,7 +345,7 @@
}
GNUNET_CONTAINER_multihashmap_put (pr_map, query, pr,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
- if (0 != (options & GSF_PRO_REQUEST_EXPIRES))
+ if (0 == (options & GSF_PRO_REQUEST_NEVER_EXPIRES))
{
pr->hnode =
GNUNET_CONTAINER_heap_insert (requests_by_expiration_heap, pr,
Modified: gnunet/src/fs/gnunet-service-fs_pr.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.h 2011-12-19 14:02:25 UTC (rev
18687)
+++ gnunet/src/fs/gnunet-service-fs_pr.h 2011-12-19 14:10:15 UTC (rev
18688)
@@ -34,6 +34,12 @@
*/
enum GSF_PendingRequestOptions
{
+
+ /**
+ * No special options (P2P-default).
+ */
+ GSF_PRO_DEFAULTS = 0,
+
/**
* Request must only be processed locally.
*/
@@ -47,7 +53,7 @@
/**
* Request persists indefinitely (no expiration).
*/
- GSF_PRO_REQUEST_EXPIRES = 4,
+ GSF_PRO_REQUEST_NEVER_EXPIRES = 4,
/**
* Request is allowed to refresh bloomfilter and change mingle value.
@@ -63,7 +69,7 @@
* Option mask for typical local requests.
*/
GSF_PRO_LOCAL_REQUEST =
- (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED)
+ (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED |
GSF_PRO_REQUEST_NEVER_EXPIRES)
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r18688 - gnunet/src/fs,
gnunet <=