journal-gatewayd: fix segfault with certain request (#3893)
authorYi EungJun <semtlenori@gmail.com>
Sat, 6 Aug 2016 20:39:13 +0000 (05:39 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 6 Aug 2016 20:39:13 +0000 (16:39 -0400)
commit3475fc5899db8c8c9198573912429b85213e4862
treec375f7d0d059fd2fbf48e03a979561c407e06043
parent1aa1e59c7f34acdbd1af7c18e1fc471e5b92ed85
journal-gatewayd: fix segfault with certain request (#3893)

When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes https://github.com/systemd/systemd/issues/3873.
src/journal-remote/journal-gatewayd.c