journal-remote: do not attempt to read from µhttpd connections

This chunk got lost in one of the rebases :(
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-03-17 22:11:18 -04:00
parent 1dba654b27
commit 9786767a36

View file

@ -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();