From: Kern Sibbald Date: Sun, 24 Aug 2008 09:39:52 +0000 (+0000) Subject: kes Fix NULL Volume name error when reading and the drive must X-Git-Tag: Release-2.4.3~22 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e0f4d8caff544aed8cd91216594e2e6a3851cba;p=bacula%2Fbacula kes Fix NULL Volume name error when reading and the drive must be switched. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7501 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index f6ae3ca58c..5b1cc95cee 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -111,10 +111,10 @@ bool acquire_device_for_read(DCR *dcr) DIRSTORE *store; int stat; - Jmsg3(jcr, M_INFO, 0, _("Changing device. Want Media Type=\"%s\" have=\"%s\"\n" + Jmsg3(jcr, M_INFO, 0, _("Changing read device. Want Media Type=\"%s\" have=\"%s\"\n" " device=%s\n"), dcr->media_type, dev->device->media_type, dev->print_name()); - Dmsg3(50, "Changing device. Want Media Type=\"%s\" have=\"%s\"\n" + Dmsg3(50, "Changing read device. Want Media Type=\"%s\" have=\"%s\"\n" " device=%s\n", dcr->media_type, dev->device->media_type, dev->print_name()); @@ -147,9 +147,9 @@ bool acquire_device_for_read(DCR *dcr) dev = dcr->dev; /* get new device pointer */ dev->dblock(BST_DOING_ACQUIRE); dcr->VolumeName[0] = 0; - Jmsg(jcr, M_INFO, 0, _("Media Type change. New device %s chosen.\n"), + Jmsg(jcr, M_INFO, 0, _("Media Type change. New read device %s chosen.\n"), dev->print_name()); - Dmsg1(50, "Media Type change. New device %s chosen.\n", dev->print_name()); + Dmsg1(50, "Media Type change. New read device %s chosen.\n", dev->print_name()); bstrncpy(dcr->VolumeName, vol->VolumeName, sizeof(dcr->VolumeName)); bstrncpy(dcr->VolCatInfo.VolCatName, vol->VolumeName, sizeof(dcr->VolCatInfo.VolCatName)); @@ -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 ec8f238fe1..8e1f368e8a 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.4.3" -#define BDATE "14 August 2008" -#define LSMDATE "14Aug08" +#define BDATE "24 August 2008" +#define LSMDATE "24Aug08" #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.4 b/bacula/technotes-2.4 index 9dcc002d66..0f9b6002e8 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -1,6 +1,10 @@ Technical notes on version 2.4 General: +24Aug08 +kes Add more information to SD acquire.c INFO messages. +kes Fix NULL Volume name error when reading and the drive must + be switched. 14Aug08 kes Fix a Verify InitCatalog problem where in certain cases a garbage filename may be entered in the verification database. This