]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_output.c
kes Modify job report to include director name and Build OS.
[bacula/bacula] / bacula / src / dird / ua_output.c
index 83c4f2318033e8760294caabdae95df7e5aaf524..e6d77d67eb3384075e026380d6dd80278df27085 100644 (file)
@@ -447,7 +447,6 @@ static bool list_nextvol(UAContext *ua, int ndays)
 {
    JOB *job;
    JCR *jcr = ua->jcr;
-   POOL *pool;
    USTORE store;
    RUN *run;
    time_t runtime;
@@ -471,19 +470,18 @@ static bool list_nextvol(UAContext *ua, int ndays)
       }
    }
    for (run=NULL; (run = find_next_run(run, job, runtime, ndays)); ) {
-      pool = run->pool ? run->pool : NULL;
-      if (!complete_jcr_for_job(jcr, job, pool)) {
+      if (!complete_jcr_for_job(jcr, job, run->pool)) {
          return false;
       }
       memset(&pr, 0, sizeof(pr));
       pr.PoolId = jcr->jr.PoolId;
-      if (! db_get_pool_record(ua->jcr, ua->db, &pr)) {
+      if (!db_get_pool_record(ua->jcr, ua->db, &pr)) {
          bstrncpy(pr.Name, "*UnknownPool*", sizeof(pr.Name));
       }
       mr.PoolId = jcr->jr.PoolId;
       get_job_storage(&store, job, run);
       mr.StorageId = store.store->StorageId;
-      if (!find_next_volume_for_append(jcr, &mr, 1, false/*no create*/)) {
+      if (!find_next_volume_for_append(jcr, &mr, 1, fnv_no_create_vol, fnv_prune)) {
          bsendmsg(ua, _("Could not find next Volume for Job %s (%s, %s).\n"),
             job->hdr.name, pr.Name, level_to_str(run->level));
       } else {
@@ -629,7 +627,7 @@ bool complete_jcr_for_job(JCR *jcr, JOB *job, POOL *pool)
       }
       return false;
    }
-   bstrncpy(pr.Name, jcr->pool->hdr.name, sizeof(pr.Name));
+   bstrncpy(pr.Name, jcr->pool->name(), sizeof(pr.Name));
    while (!db_get_pool_record(jcr, jcr->db, &pr)) { /* get by Name */
       /* Try to create the pool */
       if (create_pool(jcr, jcr->db, jcr->pool, POOL_OP_CREATE) < 0) {