]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
worm: Fix multiple display of the WORM Recycle message
authorEric Bollengier <eric@baculasystems.com>
Fri, 9 Nov 2018 14:07:52 +0000 (15:07 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 10 Nov 2018 09:36:03 +0000 (10:36 +0100)
bacula/src/stored/askdir.c

index 81b142ff191fb254c2a76812ddee9fb5fdbbd322..a87ea2d82040f093d5e7990c6d38eb5368a3d472 100644 (file)
@@ -464,7 +464,7 @@ bool dir_update_volume_info(DCR *dcr, bool label, bool update_LastWritten,
 // }
    /* worm cannot be recycled, ensure catalog correct */
    if (dev->is_worm() && vol.VolRecycle) {
-      Jmsg(jcr, M_INFO, 0, _("WORM cassette detected: setting Recycle=No on Volume=\"%s\"\n"));
+      Jmsg(jcr, M_INFO, 0, _("WORM cassette detected: setting Recycle=No on Volume=\"%s\"\n"), vol.VolCatName);
       vol.VolRecycle = false;
    }
    pm_strcpy(VolumeName, vol.VolCatName);
@@ -537,6 +537,8 @@ bool dir_update_volume_info(DCR *dcr, bool label, bool update_LastWritten,
          dev->VolCatInfo.VolCatRecycles = dcr->VolCatInfo.VolCatRecycles;
          dev->VolCatInfo.VolCatWrites = dcr->VolCatInfo.VolCatWrites;
          dev->VolCatInfo.VolCatReads = dcr->VolCatInfo.VolCatReads;
+         dev->VolCatInfo.VolRecycle = dcr->VolCatInfo.VolRecycle;
+         dev->VolCatInfo.BytesWritten = 0;
       }
       ok = true;
    }