From e223d633664661e03ad07cddb7b4abb886f69f3b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 21 Aug 2008 19:20:46 +0000 Subject: [PATCH] Fix NULL Volume error when reading (or Migration or VBackup) must switch drives when no tape is mounted. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7500 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/acquire.c | 11 +++++++---- bacula/src/version.h | 4 ++-- bacula/technotes-2.5 | 3 +++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 5345ca35eb..89a0b7b0ad 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -430,11 +430,14 @@ bool release_device(DCR *dcr) dcr->clear_reserved(); if (dev->can_read()) { + VOLUME_CAT_INFO *vol = &dev->VolCatInfo; dev->clear_read(); /* clear read bit */ - Dmsg0(100, "dir_update_vol_info. Release0\n"); - dir_update_volume_info(dcr, false, false); /* send Volume info to Director */ - volume_unused(dcr); - + Dmsg2(000, "dir_update_vol_info. label=%d Vol=%s\n", + dev->is_labeled(), vol->VolCatName); + if (dev->is_labeled() && vol->VolCatName[0] != 0) { + dir_update_volume_info(dcr, false, false); /* send Volume info to Director */ + volume_unused(dcr); + } } else if (dev->num_writers > 0) { /* * Note if WEOT is set, we are at the end of the tape diff --git a/bacula/src/version.h b/bacula/src/version.h index 24c02cccde..8c26f18b75 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.5.3" -#define BDATE "12 Aug 2008" -#define LSMDATE "12Aug08" +#define BDATE "21 Aug 2008" +#define LSMDATE "21Aug08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index f65aefbd12..5883c75d53 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -32,6 +32,9 @@ separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) General: +21Aug08 +kes Fix NULL Volume error when reading (or Migration or VBackup) must switch + drives when no tape is mounted. 18Aug08 kes Add additional info to some SD messages. kes Add fix supplied by Martin Simmons for turning off EOL character -- 2.39.5