summaryrefslogtreecommitdiff
path: root/src/journal/journal-remote-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journal-remote-parse.c')
-rw-r--r--src/journal/journal-remote-parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/journal/journal-remote-parse.c b/src/journal/journal-remote-parse.c
index c961844c44..142de0ed1f 100644
--- a/src/journal/journal-remote-parse.c
+++ b/src/journal/journal-remote-parse.c
@@ -54,6 +54,10 @@ static int get_line(RemoteSource *source, char **line, size_t *size) {
goto docopy;
resize:
+ if (source->fd < 0)
+ /* we have to wait for some data to come to us */
+ return -EWOULDBLOCK;
+
if (source->size - source->filled < LINE_CHUNK) {
// XXX: add check for maximum line length
@@ -130,6 +134,10 @@ static int fill_fixed_size(RemoteSource *source, void **data, size_t size) {
assert(data);
while(source->filled < size) {
+ if (source->fd < 0)
+ /* we have to wait for some data to come to us */
+ return -EWOULDBLOCK;
+
if (!GREEDY_REALLOC(source->buf, source->size, size))
return log_oom();