]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_output.c
kes Fix %g in filename returned by SQL for browse tree reported by
[bacula/bacula] / bacula / src / dird / ua_output.c
index 7e3fb492799090b514e4d89a5085ffbee41fd17c..01c76f1a20e90ff11ea2266ab9c5895d74021e5c 100644 (file)
@@ -7,8 +7,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -473,6 +473,10 @@ static bool list_nextvol(UAContext *ua, int ndays)
       if (!complete_jcr_for_job(jcr, job, run->pool)) {
          return false;
       }
+      if (!jcr->jr.PoolId) {
+         ua->error_msg(_("Could not Pool Job %s\n"), job->name());
+         continue;
+      }
       memset(&pr, 0, sizeof(pr));
       pr.PoolId = jcr->jr.PoolId;
       if (!db_get_pool_record(ua->jcr, ua->db, &pr)) {
@@ -482,12 +486,12 @@ static bool list_nextvol(UAContext *ua, int ndays)
       get_job_storage(&store, job, run);
       mr.StorageId = store.store->StorageId;
       if (!find_next_volume_for_append(jcr, &mr, 1, fnv_no_create_vol, fnv_prune)) {
-         ua->error_msg(_("Could not find next Volume for Job %s (%s, %s).\n"),
-            job->hdr.name, pr.Name, level_to_str(run->level));
+         ua->error_msg(_("Could not find next Volume for Job %s (Pool=%s, Level=%s).\n"),
+            job->name(), pr.Name, level_to_str(run->level));
       } else {
          ua->send_msg(
-            _("The next Volume to be used by Job \"%s\" (%s, %s) will be %s\n"),
-            job->hdr.name, pr.Name, level_to_str(run->level), mr.VolumeName);
+            _("The next Volume to be used by Job \"%s\" (Pool=%s, Level=%s) will be %s\n"),
+            job->name(), pr.Name, level_to_str(run->level), mr.VolumeName);
          found = true;
       }
       if (jcr->db && jcr->db != ua->db) {