From b54431c5e7d54dc8c4e124e8cc5bde26d2c8b0b2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 24 Mar 2012 18:53:22 +0000 Subject: [PATCH] -fix error handling during publishing --- src/fs/fs_publish.c | 2 +- src/fs/fs_tree.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 1657e29e1..4f84db767 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -388,7 +388,6 @@ encode_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) p = pc->fi_pos; GNUNET_FS_tree_encoder_finish (p->te, &p->chk_uri, &emsg); p->te = NULL; - GNUNET_FS_file_information_sync_ (p); if (NULL != emsg) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error during tree walk: %s\n", emsg); @@ -399,6 +398,7 @@ encode_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) pi.value.publish.specifics.error.message = p->emsg; p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, 0); } + GNUNET_FS_file_information_sync_ (p); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished with tree encoder\n"); /* final progress event */ flen = GNUNET_FS_uri_chk_get_file_size (p->chk_uri); diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index a055bcd40..2bdf8a062 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c @@ -361,8 +361,8 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te) if (pt_size != te->reader (te->cls, te->publish_offset, pt_size, iob, &te->emsg)) { - te->cont (te->cls, NULL); te->in_next = GNUNET_NO; + te->cont (te->cls, NULL); return; } pt_block = iob; -- 2.25.1