From: Ana Emilia M. de Arruda Date: Tue, 20 Oct 2015 03:27:30 +0000 (-0300) Subject: Fix bug #2178 for bconsole status schedule to also list scheduled hours. X-Git-Tag: Release-7.4.5~17 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a557f7ce2b1d6225107273060f59c364cb80845b;p=bacula%2Fbacula Fix bug #2178 for bconsole status schedule to also list scheduled hours. --- diff --git a/bacula/src/dird/ua_status.c b/bacula/src/dird/ua_status.c index 52d25c34b6..4f160308db 100644 --- a/bacula/src/dird/ua_status.c +++ b/bacula/src/dird/ua_status.c @@ -665,16 +665,6 @@ static void llist_scheduled_jobs(UAContext *ua) next += 24 * 60 * 60; /* Add one day */ continue; } - for (int j=0; j < 24; j++) { - if (bit_is_set(j, run->hour)) { - tm.tm_hour = j; - tm.tm_min = run->minute; - tm.tm_sec = 0; - runtime = mktime(&tm); - bstrftime_dn(dt, sizeof(dt), runtime); - break; - } - } level = job->JobLevel; if (run->level) { @@ -699,14 +689,24 @@ static void llist_scheduled_jobs(UAContext *ua) prt_lrunhdr(ua); hdr_printed = true; } - if (ua->api) { - ua->send_msg(_("%-14s\t%-8s\t%3d\t%-18s\t%-18s\t%s\n"), - level_ptr, job_type_to_str(job->JobType), priority, dt, - job->name(), sched->name()); - } else { - ua->send_msg(_("%-14s %-8s %3d %-18s %-18s %s\n"), - level_ptr, job_type_to_str(job->JobType), priority, dt, - job->name(), sched->name()); + + for (int j=0; j < 24; j++) { + if (bit_is_set(j, run->hour)) { + tm.tm_hour = j; + tm.tm_min = run->minute; + tm.tm_sec = 0; + runtime = mktime(&tm); + bstrftime_dn(dt, sizeof(dt), runtime); + if (ua->api) { + ua->send_msg(_("%-14s\t%-8s\t%3d\t%-18s\t%-18s\t%s\n"), + level_ptr, job_type_to_str(job->JobType), priority, dt, + job->name(), sched->name()); + } else { + ua->send_msg(_("%-14s %-8s %3d %-18s %-18s %s\n"), + level_ptr, job_type_to_str(job->JobType), priority, dt, + job->name(), sched->name()); + } + } } next += 24 * 60 * 60; /* Add one day */ num_jobs++;