From 479688c1563fe04c51446cfc1b1fb3c1808c62cf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Jun 2012 21:11:46 +0000 Subject: [PATCH] -fixing #2408 --- src/fs/fs_api.c | 9 +++------ src/fs/fs_publish.c | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 651c174f2..11195eaa1 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c @@ -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; } diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 93c3046b7..6c87f03d4 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -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, -- 2.25.1