]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bug #2178 for bconsole status schedule to also list scheduled hours.
authorAna Emilia M. de Arruda <emiliaarruda@gmail.com>
Tue, 20 Oct 2015 03:27:30 +0000 (00:27 -0300)
committerKern Sibbald <kern@sibbald.com>
Sun, 2 Oct 2016 07:37:11 +0000 (09:37 +0200)
bacula/src/dird/ua_status.c

index 52d25c34b6876a8d12e9c4c31b9bdd3abc16e6fe..4f160308dbef375864548ea54763c1bbcf963d91 100644 (file)
@@ -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++;