diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-03-24 19:13:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-03-24 19:13:25 +0000 |
commit | e8a3316b8b361bff25b1fd09509e57abef1ef549 (patch) | |
tree | 0b43aabb5c7575dee538eeb0f34de45c470b2390 /src/fs/fs_publish.c | |
parent | b78e4f20e152830ca627ffc4735621f9b5b6929d (diff) | |
download | gnunet-e8a3316b8b361bff25b1fd09509e57abef1ef549.tar.gz gnunet-e8a3316b8b361bff25b1fd09509e57abef1ef549.zip |
fixing issue with gnunet-publish not closing files early enough when publishing directories with more than FD_MAX files (#2239)
Diffstat (limited to 'src/fs/fs_publish.c')
-rw-r--r-- | src/fs/fs_publish.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index b3f6415c8..e0a6f046a 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -355,6 +355,8 @@ block_reader (void *cls, uint64_t offset, size_t max, void *buf, char **emsg) | |||
355 | } | 355 | } |
356 | else | 356 | else |
357 | { | 357 | { |
358 | if (UINT64_MAX == offset) | ||
359 | return p->data.file.reader (p->data.file.reader_cls, offset, 0, NULL, NULL); | ||
358 | pt_size = GNUNET_MIN (max, p->data.file.file_size - offset); | 360 | pt_size = GNUNET_MIN (max, p->data.file.file_size - offset); |
359 | if (pt_size == 0) | 361 | if (pt_size == 0) |
360 | return 0; /* calling reader with pt_size==0 | 362 | return 0; /* calling reader with pt_size==0 |