]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Fix NULL Volume name error when reading and the drive must
authorKern Sibbald <kern@sibbald.com>
Sun, 24 Aug 2008 09:39:52 +0000 (09:39 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 24 Aug 2008 09:39:52 +0000 (09:39 +0000)
     be switched.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7501 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/acquire.c
bacula/src/version.h
bacula/technotes-2.4

index f6ae3ca58ce5b46d47bb1ff5420401fbf7ef6c68..5b1cc95ceea390e3417f7b35e9a878225ff388ef 100644 (file)
@@ -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
index ec8f238fe1d383e7a911731f39b55539f2bf2852..8e1f368e8a8316b9e5942fcb66d0d1dd9dc9fd70 100644 (file)
@@ -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 */
index 9dcc002d6665619d2ad5d253ee507cb1cac32345..0f9b6002e829ebbfaf16b7fa2060fd02e38fa1a4 100644 (file)
@@ -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