summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-upload.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-05 20:27:48 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-05 20:28:56 -0400
commit0aa176a751a00b5645007c4d0763078ce2824aba (patch)
treefbbc4d02b55d1aaa1bdbcff821c00c8e5a8f012b /src/journal-remote/journal-upload.c
parentd79ca7a622abbb0df6f5166cc0e4669373d9a614 (diff)
journal-upload: make watchdog state non-static
Also parse watchdog config when creating the Uploader object.
Diffstat (limited to 'src/journal-remote/journal-upload.c')
-rw-r--r--src/journal-remote/journal-upload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index f2e9117f9f..4647cfdeb3 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -463,6 +463,8 @@ static int setup_uploader(Uploader *u, const char *url, const char *state_file)
if (r < 0)
return log_error_errno(r, "Failed to set up signals: %m");
+ (void) sd_watchdog_enabled(false, &u->watchdog_usec);
+
return load_cursor_state(u);
}
@@ -494,7 +496,7 @@ static int perform_upload(Uploader *u) {
assert(u);
- u->reset_reference_timestamp = true;
+ u->watchdog_timestamp = now(CLOCK_MONOTONIC);
code = curl_easy_perform(u->easy);
if (code) {
if (u->error[0])