diff options
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r-- | src/fs/gnunet-publish.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index f960503c2..83dd45a28 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -169,7 +169,7 @@ do_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
169 | { | 169 | { |
170 | GNUNET_CONTAINER_meta_data_destroy (meta); | 170 | GNUNET_CONTAINER_meta_data_destroy (meta); |
171 | meta = NULL; | 171 | meta = NULL; |
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | 175 | ||
@@ -187,7 +187,7 @@ stop_scanner_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
187 | { | 187 | { |
188 | GNUNET_FS_directory_scan_abort (ds); | 188 | GNUNET_FS_directory_scan_abort (ds); |
189 | ds = NULL; | 189 | ds = NULL; |
190 | } | 190 | } |
191 | if (NULL != identity) | 191 | if (NULL != identity) |
192 | { | 192 | { |
193 | GNUNET_IDENTITY_disconnect (identity); | 193 | GNUNET_IDENTITY_disconnect (identity); |
@@ -477,7 +477,7 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item) | |||
477 | if (GNUNET_YES == item->is_directory) | 477 | if (GNUNET_YES == item->is_directory) |
478 | { | 478 | { |
479 | GNUNET_CONTAINER_meta_data_delete (item->meta, | 479 | GNUNET_CONTAINER_meta_data_delete (item->meta, |
480 | EXTRACTOR_METATYPE_MIMETYPE, | 480 | EXTRACTOR_METATYPE_MIMETYPE, |
481 | NULL, 0); | 481 | NULL, 0); |
482 | GNUNET_FS_meta_data_make_directory (item->meta); | 482 | GNUNET_FS_meta_data_make_directory (item->meta); |
483 | if (NULL == item->ksk_uri) | 483 | if (NULL == item->ksk_uri) |
@@ -488,9 +488,9 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item) | |||
488 | else | 488 | else |
489 | GNUNET_FS_uri_ksk_add_keyword (item->ksk_uri, GNUNET_FS_DIRECTORY_MIME, | 489 | GNUNET_FS_uri_ksk_add_keyword (item->ksk_uri, GNUNET_FS_DIRECTORY_MIME, |
490 | GNUNET_NO); | 490 | GNUNET_NO); |
491 | fi = GNUNET_FS_file_information_create_empty_directory (ctx, NULL, | 491 | fi = GNUNET_FS_file_information_create_empty_directory (ctx, NULL, |
492 | item->ksk_uri, | 492 | item->ksk_uri, |
493 | item->meta, | 493 | item->meta, |
494 | &bo, item->filename); | 494 | &bo, item->filename); |
495 | for (child = item->children_head; child; child = child->next) | 495 | for (child = item->children_head; child; child = child->next) |
496 | { | 496 | { |
@@ -500,9 +500,9 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item) | |||
500 | } | 500 | } |
501 | else | 501 | else |
502 | { | 502 | { |
503 | fi = GNUNET_FS_file_information_create_from_file (ctx, NULL, | 503 | fi = GNUNET_FS_file_information_create_from_file (ctx, NULL, |
504 | item->filename, | 504 | item->filename, |
505 | item->ksk_uri, item->meta, | 505 | item->ksk_uri, item->meta, |
506 | !do_insert, | 506 | !do_insert, |
507 | &bo); | 507 | &bo); |
508 | } | 508 | } |
@@ -542,7 +542,7 @@ directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result) | |||
542 | priv = NULL; | 542 | priv = NULL; |
543 | else | 543 | else |
544 | priv = GNUNET_IDENTITY_ego_get_private_key (namespace); | 544 | priv = GNUNET_IDENTITY_ego_get_private_key (namespace); |
545 | pc = GNUNET_FS_publish_start (ctx, fi, | 545 | pc = GNUNET_FS_publish_start (ctx, fi, |
546 | priv, this_id, next_id, | 546 | priv, this_id, next_id, |
547 | (do_simulate) ? | 547 | (do_simulate) ? |
548 | GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY : | 548 | GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY : |
@@ -569,8 +569,8 @@ directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result) | |||
569 | * @param reason kind of progress we are making | 569 | * @param reason kind of progress we are making |
570 | */ | 570 | */ |
571 | static void | 571 | static void |
572 | directory_scan_cb (void *cls, | 572 | directory_scan_cb (void *cls, |
573 | const char *filename, | 573 | const char *filename, |
574 | int is_directory, | 574 | int is_directory, |
575 | enum GNUNET_FS_DirScannerProgressUpdateReason reason) | 575 | enum GNUNET_FS_DirScannerProgressUpdateReason reason) |
576 | { | 576 | { |
@@ -584,21 +584,21 @@ directory_scan_cb (void *cls, | |||
584 | if (is_directory == GNUNET_YES) | 584 | if (is_directory == GNUNET_YES) |
585 | FPRINTF (stdout, _("Scanning directory `%s'.\n"), filename); | 585 | FPRINTF (stdout, _("Scanning directory `%s'.\n"), filename); |
586 | else | 586 | else |
587 | FPRINTF (stdout, _("Scanning file `%s'.\n"), filename); | 587 | FPRINTF (stdout, _("Scanning file `%s'.\n"), filename); |
588 | } | 588 | } |
589 | break; | 589 | break; |
590 | case GNUNET_FS_DIRSCANNER_FILE_IGNORED: | 590 | case GNUNET_FS_DIRSCANNER_FILE_IGNORED: |
591 | FPRINTF (stderr, | 591 | FPRINTF (stderr, |
592 | _("There was trouble processing file `%s', skipping it.\n"), | 592 | _("There was trouble processing file `%s', skipping it.\n"), |
593 | filename); | 593 | filename); |
594 | break; | 594 | break; |
595 | case GNUNET_FS_DIRSCANNER_ALL_COUNTED: | 595 | case GNUNET_FS_DIRSCANNER_ALL_COUNTED: |
596 | if (verbose) | 596 | if (verbose) |
597 | FPRINTF (stdout, "%s", _("Preprocessing complete.\n")); | 597 | FPRINTF (stdout, "%s", _("Preprocessing complete.\n")); |
598 | break; | 598 | break; |
599 | case GNUNET_FS_DIRSCANNER_EXTRACT_FINISHED: | 599 | case GNUNET_FS_DIRSCANNER_EXTRACT_FINISHED: |
600 | if (verbose > 2) | 600 | if (verbose > 2) |
601 | FPRINTF (stdout, _("Extracting meta data from file `%s' complete.\n"), filename); | 601 | FPRINTF (stdout, _("Extracting meta data from file `%s' complete.\n"), filename); |
602 | break; | 602 | break; |
603 | case GNUNET_FS_DIRSCANNER_FINISHED: | 603 | case GNUNET_FS_DIRSCANNER_FINISHED: |
604 | if (verbose > 1) | 604 | if (verbose > 1) |
@@ -630,7 +630,7 @@ directory_scan_cb (void *cls, | |||
630 | * has been initialized. | 630 | * has been initialized. |
631 | * | 631 | * |
632 | * @param args0 filename to publish | 632 | * @param args0 filename to publish |
633 | */ | 633 | */ |
634 | static void | 634 | static void |
635 | identity_continuation (const char *args0) | 635 | identity_continuation (const char *args0) |
636 | { | 636 | { |
@@ -673,8 +673,8 @@ identity_continuation (const char *args0) | |||
673 | return; | 673 | return; |
674 | } | 674 | } |
675 | ds = GNUNET_FS_directory_scan_start (args0, | 675 | ds = GNUNET_FS_directory_scan_start (args0, |
676 | disable_extractor, | 676 | disable_extractor, |
677 | ex, | 677 | ex, |
678 | &directory_scan_cb, NULL); | 678 | &directory_scan_cb, NULL); |
679 | if (NULL == ds) | 679 | if (NULL == ds) |
680 | { | 680 | { |
@@ -706,7 +706,7 @@ identity_cb (void *cls, | |||
706 | { | 706 | { |
707 | const char *args0 = cls; | 707 | const char *args0 = cls; |
708 | 708 | ||
709 | if (NULL == ego) | 709 | if (NULL == ego) |
710 | { | 710 | { |
711 | identity_continuation (args0); | 711 | identity_continuation (args0); |
712 | return; | 712 | return; |