From 9786767a36803f6a27870e6f2a666113565e19d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 17 Mar 2014 22:11:18 -0400 Subject: [PATCH] =?utf8?q?journal-remote:=20do=20not=20attempt=20to=20read?= =?utf8?q?=20from=20=C2=B5httpd=20connections?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This chunk got lost in one of the rebases :( --- src/journal/journal-remote-parse.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/journal/journal-remote-parse.c b/src/journal/journal-remote-parse.c index c961844c4..142de0ed1 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(); -- 2.30.2