From 2ae56591b5b25b1ee33e40612f1ae0593218d56c Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 13 Mar 2015 21:11:09 -0500 Subject: core: ignore any issues with setting time on jobs_in_progress_event_source CID #1237559. --- src/core/manager.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/manager.c b/src/core/manager.c index 7d573f3abb..24a66a28af 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -85,16 +85,16 @@ static int manager_dispatch_run_queue(sd_event_source *source, void *userdata); static int manager_run_generators(Manager *m); static void manager_undo_generators(Manager *m); -static int manager_watch_jobs_in_progress(Manager *m) { +static void manager_watch_jobs_in_progress(Manager *m) { usec_t next; assert(m); if (m->jobs_in_progress_event_source) - return 0; + return; next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC; - return sd_event_add_time( + (void) sd_event_add_time( m->event, &m->jobs_in_progress_event_source, CLOCK_MONOTONIC, @@ -2707,7 +2707,9 @@ void manager_check_finished(Manager *m) { if (hashmap_size(m->jobs) > 0) { if (m->jobs_in_progress_event_source) - sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC); + /* Ignore any failure, this is only for feedback */ + (void) sd_event_source_set_time(m->jobs_in_progress_event_source, + now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC); return; } -- cgit v1.2.3-54-g00ecf