diff options
author | David Barksdale <amatus@amat.us> | 2017-03-22 22:17:05 -0500 |
---|---|---|
committer | David Barksdale <amatus@amat.us> | 2017-03-22 22:19:13 -0500 |
commit | 78ecfccd774a77ae3d7a51e3f5c7c7c86cf7985b (patch) | |
tree | 1dc23a2f6d78c8026e69181ac90055929d79bba8 /src/fs/gnunet-service-fs_pr.c | |
parent | aa98f144e6db0da5a0a4cad83fe64a80bbab6692 (diff) | |
download | gnunet-78ecfccd774a77ae3d7a51e3f5c7c7c86cf7985b.tar.gz gnunet-78ecfccd774a77ae3d7a51e3f5c7c7c86cf7985b.zip |
[datastore] Return and update replication
This fixes a couple FIXMEs in the datastore code. The replication value
is now returned from the datastore and the update function can increase
the replication.
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.c')
-rw-r--r-- | src/fs/gnunet-service-fs_pr.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index b736b49c2..7c64ab98b 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -1409,6 +1409,7 @@ process_local_reply (void *cls, | |||
1409 | enum GNUNET_BLOCK_Type type, | 1409 | enum GNUNET_BLOCK_Type type, |
1410 | uint32_t priority, | 1410 | uint32_t priority, |
1411 | uint32_t anonymity, | 1411 | uint32_t anonymity, |
1412 | uint32_t replication, | ||
1412 | struct GNUNET_TIME_Absolute expiration, | 1413 | struct GNUNET_TIME_Absolute expiration, |
1413 | uint64_t uid); | 1414 | uint64_t uid); |
1414 | 1415 | ||
@@ -1470,6 +1471,7 @@ start_local_query (struct GSF_PendingRequest *pr, | |||
1470 | * @param type type of the content | 1471 | * @param type type of the content |
1471 | * @param priority priority of the content | 1472 | * @param priority priority of the content |
1472 | * @param anonymity anonymity-level for the content | 1473 | * @param anonymity anonymity-level for the content |
1474 | * @param replication replication-level for the content | ||
1473 | * @param expiration expiration time for the content | 1475 | * @param expiration expiration time for the content |
1474 | * @param uid unique identifier for the datum; | 1476 | * @param uid unique identifier for the datum; |
1475 | * maybe 0 if no unique identifier is available | 1477 | * maybe 0 if no unique identifier is available |
@@ -1482,6 +1484,7 @@ process_local_reply (void *cls, | |||
1482 | enum GNUNET_BLOCK_Type type, | 1484 | enum GNUNET_BLOCK_Type type, |
1483 | uint32_t priority, | 1485 | uint32_t priority, |
1484 | uint32_t anonymity, | 1486 | uint32_t anonymity, |
1487 | uint32_t replication, | ||
1485 | struct GNUNET_TIME_Absolute expiration, | 1488 | struct GNUNET_TIME_Absolute expiration, |
1486 | uint64_t uid) | 1489 | uint64_t uid) |
1487 | { | 1490 | { |
@@ -1563,9 +1566,17 @@ process_local_reply (void *cls, | |||
1563 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, | 1566 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, |
1564 | &odc_warn_delay_task, pr); | 1567 | &odc_warn_delay_task, pr); |
1565 | if (GNUNET_OK == | 1568 | if (GNUNET_OK == |
1566 | GNUNET_FS_handle_on_demand_block (key, size, data, type, priority, | 1569 | GNUNET_FS_handle_on_demand_block (key, |
1567 | anonymity, expiration, uid, | 1570 | size, |
1568 | &process_local_reply, pr)) | 1571 | data, |
1572 | type, | ||
1573 | priority, | ||
1574 | anonymity, | ||
1575 | replication, | ||
1576 | expiration, | ||
1577 | uid, | ||
1578 | &process_local_reply, | ||
1579 | pr)) | ||
1569 | { | 1580 | { |
1570 | GNUNET_STATISTICS_update (GSF_stats, | 1581 | GNUNET_STATISTICS_update (GSF_stats, |
1571 | gettext_noop | 1582 | gettext_noop |