mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
Merge pull request #2071 from chaloulo/journal-upload-miss-logs
journal-upload : Ignore journal event when already in uploading state.
This commit is contained in:
commit
390be1c86a
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user