aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-24 18:53:22 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-24 18:53:22 +0000
commitb54431c5e7d54dc8c4e124e8cc5bde26d2c8b0b2 (patch)
treee0e3cdde0b8f3ab8dc8cdef6c15c4e792676e09f
parent3d77798cdf795f5cf2d44f4ac78cfe0a22037f65 (diff)
downloadgnunet-b54431c5e7d54dc8c4e124e8cc5bde26d2c8b0b2.tar.gz
gnunet-b54431c5e7d54dc8c4e124e8cc5bde26d2c8b0b2.zip
-fix error handling during publishing
-rw-r--r--src/fs/fs_publish.c2
-rw-r--r--src/fs/fs_tree.c2
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)
388 p = pc->fi_pos; 388 p = pc->fi_pos;
389 GNUNET_FS_tree_encoder_finish (p->te, &p->chk_uri, &emsg); 389 GNUNET_FS_tree_encoder_finish (p->te, &p->chk_uri, &emsg);
390 p->te = NULL; 390 p->te = NULL;
391 GNUNET_FS_file_information_sync_ (p);
392 if (NULL != emsg) 391 if (NULL != emsg)
393 { 392 {
394 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error during tree walk: %s\n", emsg); 393 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)
399 pi.value.publish.specifics.error.message = p->emsg; 398 pi.value.publish.specifics.error.message = p->emsg;
400 p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, 0); 399 p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, 0);
401 } 400 }
401 GNUNET_FS_file_information_sync_ (p);
402 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished with tree encoder\n"); 402 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished with tree encoder\n");
403 /* final progress event */ 403 /* final progress event */
404 flen = GNUNET_FS_uri_chk_get_file_size (p->chk_uri); 404 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)
361 if (pt_size != 361 if (pt_size !=
362 te->reader (te->cls, te->publish_offset, pt_size, iob, &te->emsg)) 362 te->reader (te->cls, te->publish_offset, pt_size, iob, &te->emsg))
363 { 363 {
364 te->cont (te->cls, NULL);
365 te->in_next = GNUNET_NO; 364 te->in_next = GNUNET_NO;
365 te->cont (te->cls, NULL);
366 return; 366 return;
367 } 367 }
368 pt_block = iob; 368 pt_block = iob;