diff options
Diffstat (limited to 'src/fs/fs_test_lib.c')
-rw-r--r-- | src/fs/fs_test_lib.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c index 0fc36e7ac..925e36a8e 100644 --- a/src/fs/fs_test_lib.c +++ b/src/fs/fs_test_lib.c | |||
@@ -183,16 +183,16 @@ struct TestDownloadOperation | |||
183 | * @param tc scheduler context (unused) | 183 | * @param tc scheduler context (unused) |
184 | */ | 184 | */ |
185 | static void | 185 | static void |
186 | report_uri (void *cls, | 186 | report_uri (void *cls, |
187 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 187 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
188 | { | 188 | { |
189 | struct TestPublishOperation *po = cls; | 189 | struct TestPublishOperation *po = cls; |
190 | 190 | ||
191 | GNUNET_FS_publish_stop (po->publish_context); | 191 | GNUNET_FS_publish_stop (po->publish_context); |
192 | GNUNET_TESTBED_operation_done (po->fs_op); | 192 | GNUNET_TESTBED_operation_done (po->fs_op); |
193 | po->publish_cont (po->publish_cont_cls, | 193 | po->publish_cont (po->publish_cont_cls, |
194 | po->publish_uri, | 194 | po->publish_uri, |
195 | (GNUNET_YES == po->do_index) | 195 | (GNUNET_YES == po->do_index) |
196 | ? po->publish_tmp_file | 196 | ? po->publish_tmp_file |
197 | : NULL); | 197 | : NULL); |
198 | GNUNET_FS_uri_destroy (po->publish_uri); | 198 | GNUNET_FS_uri_destroy (po->publish_uri); |
@@ -272,15 +272,15 @@ publish_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
272 | * @param cls pointer to uint32_t with publishing seed | 272 | * @param cls pointer to uint32_t with publishing seed |
273 | * @param offset offset to generate data for | 273 | * @param offset offset to generate data for |
274 | * @param max maximum number of bytes to generate | 274 | * @param max maximum number of bytes to generate |
275 | * @param buf where to write generated data | 275 | * @param buf where to write generated data |
276 | * @param emsg where to store error message (unused) | 276 | * @param emsg where to store error message (unused) |
277 | * @return number of bytes written to buf | 277 | * @return number of bytes written to buf |
278 | */ | 278 | */ |
279 | static size_t | 279 | static size_t |
280 | file_generator (void *cls, | 280 | file_generator (void *cls, |
281 | uint64_t offset, | 281 | uint64_t offset, |
282 | size_t max, | 282 | size_t max, |
283 | void *buf, | 283 | void *buf, |
284 | char **emsg) | 284 | char **emsg) |
285 | { | 285 | { |
286 | uint32_t *publish_seed = cls; | 286 | uint32_t *publish_seed = cls; |
@@ -307,7 +307,7 @@ file_generator (void *cls, | |||
307 | 307 | ||
308 | /** | 308 | /** |
309 | * Connect adapter for publishing operation. | 309 | * Connect adapter for publishing operation. |
310 | * | 310 | * |
311 | * @param cls the 'struct TestPublishOperation' | 311 | * @param cls the 'struct TestPublishOperation' |
312 | * @param cfg configuration of the peer to connect to; will be available until | 312 | * @param cfg configuration of the peer to connect to; will be available until |
313 | * GNUNET_TESTBED_operation_done() is called on the operation returned | 313 | * GNUNET_TESTBED_operation_done() is called on the operation returned |
@@ -319,7 +319,7 @@ publish_connect_adapter (void *cls, | |||
319 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 319 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
320 | { | 320 | { |
321 | struct TestPublishOperation *po = cls; | 321 | struct TestPublishOperation *po = cls; |
322 | 322 | ||
323 | return GNUNET_FS_start (cfg, | 323 | return GNUNET_FS_start (cfg, |
324 | "fs-test-publish", | 324 | "fs-test-publish", |
325 | &publish_progress_cb, po, | 325 | &publish_progress_cb, po, |
@@ -330,11 +330,11 @@ publish_connect_adapter (void *cls, | |||
330 | 330 | ||
331 | /** | 331 | /** |
332 | * Adapter function called to destroy connection to file-sharing service. | 332 | * Adapter function called to destroy connection to file-sharing service. |
333 | * | 333 | * |
334 | * @param cls the 'struct GNUNET_FS_Handle' | 334 | * @param cls the 'struct GNUNET_FS_Handle' |
335 | * @param op_result unused (different for publish/download!) | 335 | * @param op_result unused (different for publish/download!) |
336 | */ | 336 | */ |
337 | static void | 337 | static void |
338 | fs_disconnect_adapter (void *cls, | 338 | fs_disconnect_adapter (void *cls, |
339 | void *op_result) | 339 | void *op_result) |
340 | { | 340 | { |
@@ -412,8 +412,8 @@ publish_fs_connect_complete_cb (void *cls, | |||
412 | else | 412 | else |
413 | { | 413 | { |
414 | fi = GNUNET_FS_file_information_create_from_reader (po->fs, po, | 414 | fi = GNUNET_FS_file_information_create_from_reader (po->fs, po, |
415 | po->size, | 415 | po->size, |
416 | &file_generator, &po->publish_seed, | 416 | &file_generator, &po->publish_seed, |
417 | NULL, NULL, | 417 | NULL, NULL, |
418 | po->do_index, &bo); | 418 | po->do_index, &bo); |
419 | } | 419 | } |
@@ -557,7 +557,7 @@ download_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
557 | 557 | ||
558 | /** | 558 | /** |
559 | * Connect adapter for download operation. | 559 | * Connect adapter for download operation. |
560 | * | 560 | * |
561 | * @param cls the 'struct TestDownloadOperation' | 561 | * @param cls the 'struct TestDownloadOperation' |
562 | * @param cfg configuration of the peer to connect to; will be available until | 562 | * @param cfg configuration of the peer to connect to; will be available until |
563 | * GNUNET_TESTBED_operation_done() is called on the operation returned | 563 | * GNUNET_TESTBED_operation_done() is called on the operation returned |
@@ -569,7 +569,7 @@ download_connect_adapter (void *cls, | |||
569 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 569 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
570 | { | 570 | { |
571 | struct TestPublishOperation *po = cls; | 571 | struct TestPublishOperation *po = cls; |
572 | 572 | ||
573 | return GNUNET_FS_start (cfg, | 573 | return GNUNET_FS_start (cfg, |
574 | "fs-test-download", | 574 | "fs-test-download", |
575 | &download_progress_cb, po, | 575 | &download_progress_cb, po, |