diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-04-03 13:47:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-04-03 13:47:56 +0000 |
commit | 8c23a185ee8d3c16c5552668dced851f82986041 (patch) | |
tree | 83f59d2190ffadcdc5643ba36578b2c6766b0e42 /src/fs/test_fs_search.c | |
parent | 1888cd7da7ae5e2c32faf66d3bef47ac7d225b35 (diff) | |
download | gnunet-8c23a185ee8d3c16c5552668dced851f82986041.tar.gz gnunet-8c23a185ee8d3c16c5552668dced851f82986041.zip |
changing datastore API to support replication level --- not fully implemented --- and adding GNUNET_FS_BlockOptions struct to replace prio/anonymity/expiration+replication args
Diffstat (limited to 'src/fs/test_fs_search.c')
-rw-r--r-- | src/fs/test_fs_search.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c index 2544b8a6e..0c44cb612 100644 --- a/src/fs/test_fs_search.c +++ b/src/fs/test_fs_search.c | |||
@@ -226,6 +226,7 @@ run (void *cls, | |||
226 | char *buf; | 226 | char *buf; |
227 | struct GNUNET_CONTAINER_MetaData *meta; | 227 | struct GNUNET_CONTAINER_MetaData *meta; |
228 | struct GNUNET_FS_Uri *kuri; | 228 | struct GNUNET_FS_Uri *kuri; |
229 | struct GNUNET_FS_BlockOptions bo; | ||
229 | struct GNUNET_FS_FileInformation *fi; | 230 | struct GNUNET_FS_FileInformation *fi; |
230 | size_t i; | 231 | size_t i; |
231 | 232 | ||
@@ -242,6 +243,10 @@ run (void *cls, | |||
242 | buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256); | 243 | buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256); |
243 | meta = GNUNET_CONTAINER_meta_data_create (); | 244 | meta = GNUNET_CONTAINER_meta_data_create (); |
244 | kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); | 245 | kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); |
246 | bo.content_priority = 42; | ||
247 | bo.anonymity_level = 1; | ||
248 | bo.replication_level = 0; | ||
249 | bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); | ||
245 | fi = GNUNET_FS_file_information_create_from_data (fs, | 250 | fi = GNUNET_FS_file_information_create_from_data (fs, |
246 | "publish-context", | 251 | "publish-context", |
247 | FILESIZE, | 252 | FILESIZE, |
@@ -249,9 +254,7 @@ run (void *cls, | |||
249 | kuri, | 254 | kuri, |
250 | meta, | 255 | meta, |
251 | GNUNET_NO, | 256 | GNUNET_NO, |
252 | 1, | 257 | &bo); |
253 | 42, | ||
254 | GNUNET_TIME_relative_to_absolute (LIFETIME)); | ||
255 | GNUNET_FS_uri_destroy (kuri); | 258 | GNUNET_FS_uri_destroy (kuri); |
256 | GNUNET_CONTAINER_meta_data_destroy (meta); | 259 | GNUNET_CONTAINER_meta_data_destroy (meta); |
257 | GNUNET_assert (NULL != fi); | 260 | GNUNET_assert (NULL != fi); |