summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-01-21 16:23:46 +0100
committerDaniel Mack <github@zonque.org>2016-01-21 16:23:46 +0100
commit390be1c86af3b8217d4ec53c45f789f4d1995ee8 (patch)
tree9b2a85fc1bb8da8774f7e7989a9eca54aadfa347 /src
parentbef33b6c0a8e3d443670004ba669910e865f5f41 (diff)
parent8a3db16df40c1bbcb1d1debc80fbf92339503235 (diff)
Merge pull request #2071 from chaloulo/journal-upload-miss-logs
journal-upload : Ignore journal event when already in uploading state.
Diffstat (limited to 'src')
-rw-r--r--src/journal-remote/journal-upload-journal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal-remote/journal-upload-journal.c b/src/journal-remote/journal-upload-journal.c
index a6d7c3b7e8..f9d2385215 100644
--- a/src/journal-remote/journal-upload-journal.c
+++ b/src/journal-remote/journal-upload-journal.c
@@ -312,6 +312,9 @@ void close_journal_input(Uploader *u) {
static int process_journal_input(Uploader *u, int skip) {
int r;
+ if (u->uploading)
+ return 0;
+
r = sd_journal_next_skip(u->journal, skip);
if (r < 0)
return log_error_errno(r, "Failed to skip to next entry: %m");
@@ -349,10 +352,8 @@ static int dispatch_journal_input(sd_event_source *event,
assert(u);
- if (u->uploading) {
- log_warning("dispatch_journal_input called when uploading, ignoring.");
+ if (u->uploading)
return 0;
- }
log_debug("Detected journal input, checking for new data.");
return check_journal_input(u);