diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2013-03-04 14:38:51 +0100 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-03-04 14:51:32 +0100 |
commit | a0b6422689e37ffee37742d027f91af8bacfa78d (patch) | |
tree | 0171f82a315cfee81788b29e462c23beaefd0134 /src/journal/microhttpd-util.h | |
parent | 19fbec19192998fa7fc0c24a58038b98cf989802 (diff) |
core/manager: fix conditions to start and stop watching running jobs
Harald encountered division by zero in manager_print_jobs_in_progress.
Clearly we had the watch enabled when we shouldn't - there were no
running jobs in m->jobs, only waiting ones. This is either a deadlock,
or maybe some of them would be detected as runnable in the next dispatch
of the run queue. In any case we mustn't crash.
Fix it by starting and stopping the watch based on n_running_jobs
instead of the number of all jobs.
Diffstat (limited to 'src/journal/microhttpd-util.h')
0 files changed, 0 insertions, 0 deletions