From 959fb16033738e5fae686cf14836b6cd3a073e39 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 7 Apr 2008 20:45:15 +0000 Subject: [PATCH] Apply Eric's suggested volume_unused patch git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6753 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/acquire.c | 6 ++++-- bacula/src/version.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index d41ba82c1d..ad1f344fce 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -519,11 +519,13 @@ bool release_device(DCR *dcr) Jmsg(jcr, M_FATAL, 0, _("Could not create JobMedia record for Volume=\"%s\" Job=%s\n"), dcr->VolCatInfo.VolCatName, jcr->Job); } - /* If no more writers, write an EOF */ + /* If no more writers, and no errors, and wrote something, write an EOF */ if (!dev->num_writers && dev->can_write() && dev->block_num > 0) { dev->weof(1); write_ansi_ibm_labels(dcr, ANSI_EOF_LABEL, dev->VolHdr.VolumeName); - volume_unused(dcr); + } + if (!dev->num_writers) { /* if no more writers */ + volume_unused(dcr); /* we obviously are not using the volume */ } if (!dev->at_weot()) { dev->VolCatInfo.VolCatFiles = dev->file; /* set number of files */ diff --git a/bacula/src/version.h b/bacula/src/version.h index 2c44dc8038..c3853541c7 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.2.9-b6" -#define BDATE "06 April 2008" -#define LSMDATE "06Apr08" +#define BDATE "07 April 2008" +#define LSMDATE "07Apr08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ -- 2.39.5