]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_status.c
This commit was manufactured by cvs2svn to create tag
[bacula/bacula] / bacula / src / dird / ua_status.c
index 84138f31b0df4961d6ec14e8e0f355905b9fd9b9..16b9581cf60f6e4e8a8071c0d44a13a93e9ad3b6 100644 (file)
@@ -360,6 +360,7 @@ struct sched_pkt {
    int priority;
    time_t runtime;
    POOL *pool;
+   STORE *store;
 };
 
 static void prt_runtime(UAContext *ua, sched_pkt *sp)
@@ -379,7 +380,8 @@ static void prt_runtime(UAContext *ua, sched_pkt *sp)
          close_db = true;             /* new db opened, remember to close it */
       }
       if (ok) {
-         mr.PoolId = jcr->jr.PoolId;
+         mr.PoolId = jcr->PoolId;
+         mr.StorageId = sp->store->StorageId;
          ok = find_next_volume_for_append(jcr, &mr, 1, false/*no create*/);
       }
       if (!ok) {
@@ -435,6 +437,7 @@ static void list_scheduled_jobs(UAContext *ua)
    time_t runtime;
    RUN *run;
    JOB *job;
+   STORE* store;
    int level, num_jobs = 0;
    int priority;
    bool hdr_printed = false;
@@ -469,6 +472,11 @@ static void list_scheduled_jobs(UAContext *ua)
          if (run->Priority) {
             priority = run->Priority;
          }
+         if (run->storage) {
+            store = run->storage;
+         } else {
+            store = (STORE *)job->storage->first();
+         }
          if (!hdr_printed) {
             prt_runhdr(ua);
             hdr_printed = true;
@@ -479,6 +487,7 @@ static void list_scheduled_jobs(UAContext *ua)
          sp->priority = priority;
          sp->runtime = runtime;
          sp->pool = run->pool;
+         sp->store = store;
          sched.binary_insert_multiple(sp, my_compare);
          num_jobs++;
       }