]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_output.c
kes Update copyright date in program files, and for the most part
[bacula/bacula] / bacula / src / dird / ua_output.c
index a738dfe326aab085c81c65efc16304ee70ef9d28..b0e261ba49a40abe185879869b4e1f5ee4f45f65 100644 (file)
@@ -33,9 +33,6 @@ extern int r_first;
 extern int r_last;
 extern RES_TABLE resources[];
 extern RES **res_head;
-extern int console_msg_pending;
-extern FILE *con_fd;
-extern brwlock_t con_lock;
 
 /* Imported functions */
 
@@ -468,15 +465,15 @@ static bool list_nextvol(UAContext *ua, int ndays)
       memset(&pr, 0, sizeof(pr));
       pr.PoolId = jcr->jr.PoolId;
       if (! db_get_pool_record(ua->jcr, ua->db, &pr)) {
-         strcpy(pr.Name, "*UnknownPool*");
+         bstrncpy(pr.Name, "*UnknownPool*", sizeof(pr.Name));
       }
       mr.PoolId = jcr->jr.PoolId;
       if (run->storage) {
-         jcr->store = run->storage;
+         jcr->wstore = run->storage;
       } else {
-         jcr->store = (STORE *)job->storage->first();
+         jcr->wstore = (STORE *)job->storage->first();
       }
-      mr.StorageId = jcr->store->StorageId;
+      mr.StorageId = jcr->wstore->StorageId;
       if (!find_next_volume_for_append(jcr, &mr, 1, false/*no create*/)) {
          bsendmsg(ua, _("Could not find next Volume for Job %s (%s, %s).\n"),
             job->hdr.name, pr.Name, level_to_str(run->level));