aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_pr.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-22 18:27:12 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-22 18:27:12 +0000
commit220575cb7eb46b0b7cde05733ba86d6e2e7a9aa7 (patch)
tree330fbd76a980d12941aa54cd2169fc3220909897 /src/fs/gnunet-service-fs_pr.c
parent8a83bf0dd1b5ed1037b3445097d03b644fabd844 (diff)
downloadgnunet-220575cb7eb46b0b7cde05733ba86d6e2e7a9aa7.tar.gz
gnunet-220575cb7eb46b0b7cde05733ba86d6e2e7a9aa7.zip
mostly finishing server-side for FS-over-stream
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.c')
-rw-r--r--src/fs/gnunet-service-fs_pr.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index 349232daf..9233658eb 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -196,12 +196,6 @@ static int active_to_migration;
196 196
197 197
198/** 198/**
199 * Size of the datastore queue we assume for common requests.
200 * Determined based on the network quota.
201 */
202static unsigned int datastore_queue_size;
203
204/**
205 * Heap with the request that will expire next at the top. Contains 199 * Heap with the request that will expire next at the top. Contains
206 * pointers of type "struct PendingRequest*"; these will *also* be 200 * pointers of type "struct PendingRequest*"; these will *also* be
207 * aliased from the "requests_by_peer" data structures and the 201 * aliased from the "requests_by_peer" data structures and the
@@ -1307,7 +1301,7 @@ process_local_reply (void *cls, const struct GNUNET_HashCode * key, size_t size,
1307 (0 != 1301 (0 !=
1308 (GSF_PRO_PRIORITY_UNLIMITED & 1302 (GSF_PRO_PRIORITY_UNLIMITED &
1309 pr->public_data.options)) ? UINT_MAX : 1303 pr->public_data.options)) ? UINT_MAX :
1310 datastore_queue_size 1304 GSF_datastore_queue_size
1311 /* max queue size */ , 1305 /* max queue size */ ,
1312 GNUNET_TIME_UNIT_FOREVER_REL, 1306 GNUNET_TIME_UNIT_FOREVER_REL,
1313 &process_local_reply, pr); 1307 &process_local_reply, pr);
@@ -1347,7 +1341,7 @@ process_local_reply (void *cls, const struct GNUNET_HashCode * key, size_t size,
1347 (0 != 1341 (0 !=
1348 (GSF_PRO_PRIORITY_UNLIMITED & 1342 (GSF_PRO_PRIORITY_UNLIMITED &
1349 pr->public_data.options)) ? UINT_MAX : 1343 pr->public_data.options)) ? UINT_MAX :
1350 datastore_queue_size 1344 GSF_datastore_queue_size
1351 /* max queue size */ , 1345 /* max queue size */ ,
1352 GNUNET_TIME_UNIT_FOREVER_REL, 1346 GNUNET_TIME_UNIT_FOREVER_REL,
1353 &process_local_reply, pr); 1347 &process_local_reply, pr);
@@ -1405,7 +1399,7 @@ process_local_reply (void *cls, const struct GNUNET_HashCode * key, size_t size,
1405 (0 != 1399 (0 !=
1406 (GSF_PRO_PRIORITY_UNLIMITED & pr-> 1400 (GSF_PRO_PRIORITY_UNLIMITED & pr->
1407 public_data.options)) ? UINT_MAX : 1401 public_data.options)) ? UINT_MAX :
1408 datastore_queue_size 1402 GSF_datastore_queue_size
1409 /* max queue size */ , 1403 /* max queue size */ ,
1410 GNUNET_TIME_UNIT_FOREVER_REL, 1404 GNUNET_TIME_UNIT_FOREVER_REL,
1411 &process_local_reply, pr); 1405 &process_local_reply, pr);
@@ -1487,7 +1481,7 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr,
1487 (0 != 1481 (0 !=
1488 (GSF_PRO_PRIORITY_UNLIMITED & pr-> 1482 (GSF_PRO_PRIORITY_UNLIMITED & pr->
1489 public_data.options)) ? UINT_MAX : 1483 public_data.options)) ? UINT_MAX :
1490 datastore_queue_size 1484 GSF_datastore_queue_size
1491 /* max queue size */ , 1485 /* max queue size */ ,
1492 GNUNET_TIME_UNIT_FOREVER_REL, 1486 GNUNET_TIME_UNIT_FOREVER_REL,
1493 &process_local_reply, pr); 1487 &process_local_reply, pr);
@@ -1639,8 +1633,6 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
1639void 1633void
1640GSF_pending_request_init_ () 1634GSF_pending_request_init_ ()
1641{ 1635{
1642 unsigned long long dqs;
1643
1644 if (GNUNET_OK != 1636 if (GNUNET_OK !=
1645 GNUNET_CONFIGURATION_get_value_number (GSF_cfg, "fs", 1637 GNUNET_CONFIGURATION_get_value_number (GSF_cfg, "fs",
1646 "MAX_PENDING_REQUESTS", 1638 "MAX_PENDING_REQUESTS",
@@ -1649,16 +1641,6 @@ GSF_pending_request_init_ ()
1649 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO, 1641 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO,
1650 "fs", "MAX_PENDING_REQUESTS"); 1642 "fs", "MAX_PENDING_REQUESTS");
1651 } 1643 }
1652 if (GNUNET_OK !=
1653 GNUNET_CONFIGURATION_get_value_size (GSF_cfg, "fs", "DATASTORE_QUEUE_SIZE",
1654 &dqs))
1655 {
1656 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO,
1657 "fs", "DATASTORE_QUEUE_SIZE");
1658 dqs = 1024;
1659 }
1660 datastore_queue_size = (unsigned int) dqs;
1661
1662 active_to_migration = 1644 active_to_migration =
1663 GNUNET_CONFIGURATION_get_value_yesno (GSF_cfg, "FS", "CONTENT_CACHING"); 1645 GNUNET_CONFIGURATION_get_value_yesno (GSF_cfg, "FS", "CONTENT_CACHING");
1664 datastore_put_load = GNUNET_LOAD_value_init (DATASTORE_LOAD_AUTODECLINE); 1646 datastore_put_load = GNUNET_LOAD_value_init (DATASTORE_LOAD_AUTODECLINE);