diff options
Diffstat (limited to 'src/fs/test_fs_file_information.c')
-rw-r--r-- | src/fs/test_fs_file_information.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/fs/test_fs_file_information.c b/src/fs/test_fs_file_information.c index 914dbad9f..00e3c2211 100644 --- a/src/fs/test_fs_file_information.c +++ b/src/fs/test_fs_file_information.c | |||
@@ -55,10 +55,8 @@ mycleaner(void *cls, | |||
55 | uint64_t length, | 55 | uint64_t length, |
56 | struct GNUNET_CONTAINER_MetaData *meta, | 56 | struct GNUNET_CONTAINER_MetaData *meta, |
57 | struct GNUNET_FS_Uri **uri, | 57 | struct GNUNET_FS_Uri **uri, |
58 | uint32_t *anonymity, | 58 | struct GNUNET_FS_BlockOptions *bo, |
59 | uint32_t *priority, | ||
60 | int *do_index, | 59 | int *do_index, |
61 | struct GNUNET_TIME_Absolute *expirationTime, | ||
62 | void **client_info) | 60 | void **client_info) |
63 | { | 61 | { |
64 | return GNUNET_OK; | 62 | return GNUNET_OK; |
@@ -85,6 +83,7 @@ run (void *cls, | |||
85 | struct GNUNET_FS_FileInformation *fidir; | 83 | struct GNUNET_FS_FileInformation *fidir; |
86 | struct GNUNET_FS_Handle *fs; | 84 | struct GNUNET_FS_Handle *fs; |
87 | size_t i; | 85 | size_t i; |
86 | struct GNUNET_FS_BlockOptions bo; | ||
88 | 87 | ||
89 | fs = GNUNET_FS_start (cfg, "test-fs-file-information", NULL, NULL, | 88 | fs = GNUNET_FS_start (cfg, "test-fs-file-information", NULL, NULL, |
90 | GNUNET_FS_FLAGS_NONE, | 89 | GNUNET_FS_FLAGS_NONE, |
@@ -112,16 +111,18 @@ run (void *cls, | |||
112 | GNUNET_free (buf); | 111 | GNUNET_free (buf); |
113 | 112 | ||
114 | meta = GNUNET_CONTAINER_meta_data_create (); | 113 | meta = GNUNET_CONTAINER_meta_data_create (); |
115 | kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); | 114 | kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); |
115 | bo.content_priority = 42; | ||
116 | bo.anonymity_level = 1; | ||
117 | bo.replication_level = 0; | ||
118 | bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); | ||
116 | fi1 = GNUNET_FS_file_information_create_from_file (fs, | 119 | fi1 = GNUNET_FS_file_information_create_from_file (fs, |
117 | "file_information-context1", | 120 | "file_information-context1", |
118 | fn1, | 121 | fn1, |
119 | kuri, | 122 | kuri, |
120 | meta, | 123 | meta, |
121 | GNUNET_YES, | 124 | GNUNET_YES, |
122 | 1, | 125 | &bo); |
123 | 42, | ||
124 | GNUNET_TIME_relative_to_absolute (LIFETIME)); | ||
125 | GNUNET_assert (fi1 != NULL); | 126 | GNUNET_assert (fi1 != NULL); |
126 | fi2 = GNUNET_FS_file_information_create_from_file (fs, | 127 | fi2 = GNUNET_FS_file_information_create_from_file (fs, |
127 | "file_information-context2", | 128 | "file_information-context2", |
@@ -129,17 +130,13 @@ run (void *cls, | |||
129 | kuri, | 130 | kuri, |
130 | meta, | 131 | meta, |
131 | GNUNET_YES, | 132 | GNUNET_YES, |
132 | 1, | 133 | &bo); |
133 | 42, | ||
134 | GNUNET_TIME_relative_to_absolute (LIFETIME)); | ||
135 | GNUNET_assert (fi2 != NULL); | 134 | GNUNET_assert (fi2 != NULL); |
136 | fidir = GNUNET_FS_file_information_create_empty_directory (fs, | 135 | fidir = GNUNET_FS_file_information_create_empty_directory (fs, |
137 | "file_information-context-dir", | 136 | "file_information-context-dir", |
138 | kuri, | 137 | kuri, |
139 | meta, | 138 | meta, |
140 | 1, | 139 | &bo); |
141 | 42, | ||
142 | GNUNET_TIME_relative_to_absolute (LIFETIME)); | ||
143 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1)); | 140 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1)); |
144 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2)); | 141 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2)); |
145 | GNUNET_FS_uri_destroy (kuri); | 142 | GNUNET_FS_uri_destroy (kuri); |