-fixing #2408
authorChristian Grothoff <christian@grothoff.org>
Thu, 7 Jun 2012 21:11:46 +0000 (21:11 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 7 Jun 2012 21:11:46 +0000 (21:11 +0000)
src/fs/fs_api.c
src/fs/fs_publish.c

index 651c174f283692380ff1f1228a0e8cdba48c1b97..11195eaa144885c13adf8149d6a2ad057bffefaa 100644 (file)
@@ -496,7 +496,7 @@ get_read_handle (struct GNUNET_FS_Handle *h, const char *ext, const char *ent)
   struct GNUNET_BIO_ReadHandle *ret;
 
   fn = get_serialization_file_name (h, ext, ent);
-  if (fn == NULL)
+  if (NULL == fn)
     return NULL;
   ret = GNUNET_BIO_read_open (fn);
   GNUNET_free (fn);
@@ -519,13 +519,10 @@ get_write_handle (struct GNUNET_FS_Handle *h, const char *ext, const char *ent)
   struct GNUNET_BIO_WriteHandle *ret;
 
   fn = get_serialization_file_name (h, ext, ent);
-  if (fn == NULL)
-  {
+  if (NULL == fn)
     return NULL;
-  }
   ret = GNUNET_BIO_write_open (fn);
-  if (ret == NULL)
-    GNUNET_break (0);
+  GNUNET_break (ret != NULL);
   GNUNET_free (fn);
   return ret;
 }
index 93c3046b756ac1e74fe378d625e478508c8f5479..6c87f03d44d39b3bd98a68c3f0769b736561772c 100644 (file)
@@ -569,6 +569,7 @@ publish_content (struct GNUNET_FS_PublishContext *pc)
               GNUNET_free (raw_data);
               raw_data = NULL;
             }
+           dirpos->data.file.reader (dirpos->data.file.reader_cls, UINT64_MAX, 0, 0, NULL);
           }
         }
         GNUNET_FS_directory_builder_add (db, dirpos->chk_uri, dirpos->meta,