aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-04-03 20:00:42 +0000
committerChristian Grothoff <christian@grothoff.org>2011-04-03 20:00:42 +0000
commite8f35bb025c25839a52fb502e452393831e4e6f0 (patch)
tree7a056253bddc61b1e6a3258567e176af128c2b67 /src/fs/gnunet-service-fs.c
parent9f871785d57da57ba128ac2279fda1db1d9b8bfb (diff)
downloadgnunet-e8f35bb025c25839a52fb502e452393831e4e6f0.tar.gz
gnunet-e8f35bb025c25839a52fb502e452393831e4e6f0.zip
improving datastore API --- not working yet
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r--src/fs/gnunet-service-fs.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index caf534140..35d89c50f 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -1297,7 +1297,7 @@ process_migration_content (void *cls,
1297 MIN_MIGRATION_CONTENT_LIFETIME.rel_value) 1297 MIN_MIGRATION_CONTENT_LIFETIME.rel_value)
1298 { 1298 {
1299 /* content will expire soon, don't bother */ 1299 /* content will expire soon, don't bother */
1300 GNUNET_DATASTORE_get_next (dsh); 1300 GNUNET_DATASTORE_iterate_get_next (dsh);
1301 return; 1301 return;
1302 } 1302 }
1303 if (type == GNUNET_BLOCK_TYPE_FS_ONDEMAND) 1303 if (type == GNUNET_BLOCK_TYPE_FS_ONDEMAND)
@@ -1309,7 +1309,7 @@ process_migration_content (void *cls,
1309 &process_migration_content, 1309 &process_migration_content,
1310 NULL)) 1310 NULL))
1311 { 1311 {
1312 GNUNET_DATASTORE_get_next (dsh); 1312 GNUNET_DATASTORE_iterate_get_next (dsh);
1313 } 1313 }
1314 return; 1314 return;
1315 } 1315 }
@@ -1333,7 +1333,7 @@ process_migration_content (void *cls,
1333 GNUNET_CONTAINER_multihashmap_iterate (connected_peers, 1333 GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
1334 &consider_migration, 1334 &consider_migration,
1335 mb); 1335 mb);
1336 GNUNET_DATASTORE_get_next (dsh); 1336 GNUNET_DATASTORE_iterate_get_next (dsh);
1337} 1337}
1338 1338
1339 1339
@@ -1344,7 +1344,7 @@ static void
1344dht_put_continuation (void *cls, 1344dht_put_continuation (void *cls,
1345 const struct GNUNET_SCHEDULER_TaskContext *tc) 1345 const struct GNUNET_SCHEDULER_TaskContext *tc)
1346{ 1346{
1347 GNUNET_DATASTORE_get_next (dsh); 1347 GNUNET_DATASTORE_iterate_get_next (dsh);
1348} 1348}
1349 1349
1350 1350
@@ -1455,10 +1455,10 @@ gather_dht_put_blocks (void *cls,
1455 { 1455 {
1456 if (dht_put_type == GNUNET_BLOCK_TYPE_FS_ONDEMAND) 1456 if (dht_put_type == GNUNET_BLOCK_TYPE_FS_ONDEMAND)
1457 dht_put_type = GNUNET_BLOCK_TYPE_FS_KBLOCK; 1457 dht_put_type = GNUNET_BLOCK_TYPE_FS_KBLOCK;
1458 dht_qe = GNUNET_DATASTORE_get_zero_anonymity (dsh, 0, UINT_MAX, 1458 dht_qe = GNUNET_DATASTORE_iterate_zero_anonymity (dsh, 0, UINT_MAX,
1459 GNUNET_TIME_UNIT_FOREVER_REL, 1459 GNUNET_TIME_UNIT_FOREVER_REL,
1460 dht_put_type++, 1460 dht_put_type++,
1461 &process_dht_put_content, NULL); 1461 &process_dht_put_content, NULL);
1462 GNUNET_assert (dht_qe != NULL); 1462 GNUNET_assert (dht_qe != NULL);
1463 } 1463 }
1464} 1464}
@@ -3991,7 +3991,7 @@ process_local_reply (void *cls,
3991 pr)) 3991 pr))
3992 if (pr->qe != NULL) 3992 if (pr->qe != NULL)
3993 { 3993 {
3994 GNUNET_DATASTORE_get_next (dsh); 3994 GNUNET_DATASTORE_iterate_get_next (dsh);
3995 } 3995 }
3996 return; 3996 return;
3997 } 3997 }
@@ -4014,7 +4014,7 @@ process_local_reply (void *cls,
4014 -1, -1, 4014 -1, -1,
4015 GNUNET_TIME_UNIT_FOREVER_REL, 4015 GNUNET_TIME_UNIT_FOREVER_REL,
4016 NULL, NULL); 4016 NULL, NULL);
4017 GNUNET_DATASTORE_get_next (dsh); 4017 GNUNET_DATASTORE_iterate_get_next (dsh);
4018 return; 4018 return;
4019 } 4019 }
4020 prq.type = type; 4020 prq.type = type;
@@ -4033,7 +4033,7 @@ process_local_reply (void *cls,
4033 if (prq.eval == GNUNET_BLOCK_EVALUATION_OK_LAST) 4033 if (prq.eval == GNUNET_BLOCK_EVALUATION_OK_LAST)
4034 { 4034 {
4035 pr->local_only = GNUNET_YES; /* do not forward */ 4035 pr->local_only = GNUNET_YES; /* do not forward */
4036 GNUNET_DATASTORE_get_next (dsh); 4036 GNUNET_DATASTORE_iterate_get_next (dsh);
4037 return; 4037 return;
4038 } 4038 }
4039 if ( (pr->client_request_list == NULL) && 4039 if ( (pr->client_request_list == NULL) &&
@@ -4048,10 +4048,10 @@ process_local_reply (void *cls,
4048 gettext_noop ("# processing result set cut short due to load"), 4048 gettext_noop ("# processing result set cut short due to load"),
4049 1, 4049 1,
4050 GNUNET_NO); 4050 GNUNET_NO);
4051 GNUNET_DATASTORE_get_next (dsh); 4051 GNUNET_DATASTORE_iterate_get_next (dsh);
4052 return; 4052 return;
4053 } 4053 }
4054 GNUNET_DATASTORE_get_next (dsh); 4054 GNUNET_DATASTORE_iterate_get_next (dsh);
4055} 4055}
4056 4056
4057 4057
@@ -4412,14 +4412,14 @@ handle_p2p_get (void *cls,
4412 "Handing request for `%s' to datastore\n", 4412 "Handing request for `%s' to datastore\n",
4413 GNUNET_h2s (&gm->query)); 4413 GNUNET_h2s (&gm->query));
4414#endif 4414#endif
4415 pr->qe = GNUNET_DATASTORE_get (dsh, 4415 pr->qe = GNUNET_DATASTORE_iterate_key (dsh,
4416 &gm->query, 4416 &gm->query,
4417 type, 4417 type,
4418 pr->priority + 1, 4418 pr->priority + 1,
4419 MAX_DATASTORE_QUEUE, 4419 MAX_DATASTORE_QUEUE,
4420 timeout, 4420 timeout,
4421 &process_local_reply, 4421 &process_local_reply,
4422 pr); 4422 pr);
4423 if (NULL == pr->qe) 4423 if (NULL == pr->qe)
4424 { 4424 {
4425 GNUNET_STATISTICS_update (stats, 4425 GNUNET_STATISTICS_update (stats,
@@ -4617,13 +4617,13 @@ handle_start_search (void *cls,
4617 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); 4617 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
4618 if (type == GNUNET_BLOCK_TYPE_FS_DBLOCK) 4618 if (type == GNUNET_BLOCK_TYPE_FS_DBLOCK)
4619 type = GNUNET_BLOCK_TYPE_ANY; /* get on-demand blocks too! */ 4619 type = GNUNET_BLOCK_TYPE_ANY; /* get on-demand blocks too! */
4620 pr->qe = GNUNET_DATASTORE_get (dsh, 4620 pr->qe = GNUNET_DATASTORE_iterate_key (dsh,
4621 &sm->query, 4621 &sm->query,
4622 type, 4622 type,
4623 -3, -1, 4623 -3, -1,
4624 GNUNET_CONSTANTS_SERVICE_TIMEOUT, 4624 GNUNET_CONSTANTS_SERVICE_TIMEOUT,
4625 &process_local_reply, 4625 &process_local_reply,
4626 pr); 4626 pr);
4627} 4627}
4628 4628
4629 4629