gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20750 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r20750 - gnunet/src/fs
Date: Sat, 24 Mar 2012 19:54:40 +0100

Author: grothoff
Date: 2012-03-24 19:54:40 +0100 (Sat, 24 Mar 2012)
New Revision: 20750

Modified:
   gnunet/src/fs/fs_publish.c
Log:
-fix error handling during publishing

Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c  2012-03-24 18:53:22 UTC (rev 20749)
+++ gnunet/src/fs/fs_publish.c  2012-03-24 18:54:40 UTC (rev 20750)
@@ -385,6 +385,7 @@
   char *emsg;
   uint64_t flen;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished with tree encoder\n");
   p = pc->fi_pos;
   GNUNET_FS_tree_encoder_finish (p->te, &p->chk_uri, &emsg);
   p->te = NULL;
@@ -398,17 +399,19 @@
     pi.value.publish.specifics.error.message = p->emsg;
     p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, 0);
   }
+  else
+  {
+  /* final progress event */
+    GNUNET_assert (NULL != p->chk_uri);
+    flen = GNUNET_FS_uri_chk_get_file_size (p->chk_uri);
+    pi.status = GNUNET_FS_STATUS_PUBLISH_PROGRESS;
+    pi.value.publish.specifics.progress.data = NULL;
+    pi.value.publish.specifics.progress.offset = flen;
+    pi.value.publish.specifics.progress.data_len = 0;
+    pi.value.publish.specifics.progress.depth = GNUNET_FS_compute_depth (flen);
+    p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, flen);
+  }
   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);
-  pi.status = GNUNET_FS_STATUS_PUBLISH_PROGRESS;
-  pi.value.publish.specifics.progress.data = NULL;
-  pi.value.publish.specifics.progress.offset = flen;
-  pi.value.publish.specifics.progress.data_len = 0;
-  pi.value.publish.specifics.progress.depth = GNUNET_FS_compute_depth (flen);
-  p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, flen);
-
   /* continue with main */
   GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task);
   pc->upload_task =




reply via email to

[Prev in Thread] Current Thread [Next in Thread]