]> git.sur5r.net Git - bacula/bacula/commitdiff
- Fix bug where Storage daemon gets confused about what
authorKern Sibbald <kern@sibbald.com>
Mon, 20 Jun 2005 09:14:50 +0000 (09:14 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 20 Jun 2005 09:14:50 +0000 (09:14 +0000)
  tape is mounted. (one line of code was inadvertently
  deleted).

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2149 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/kes-1.37
bacula/src/cats/postgresql.c
bacula/src/stored/label.c
bacula/src/stored/mount.c
bacula/src/version.h

index b9f4a32ecf9b9901c5dbdafd86191f7116bc37d9..16e0db4fb7ff8f39b116ecfa6623f56fa14735fb 100644 (file)
@@ -1,4 +1,10 @@
 
+Changes to 1.37.25 release on 20 Jun 05:
+20Jun05:
+- Fix bug where Storage daemon gets confused about what
+  tape is mounted. (one line of code was inadvertently 
+  deleted).
+
 Changes to 1.37.24:
 18Jun05
 - DVD writing/reading seems to be mostly working.
index 786fae41e811a437f297cfa5586fa59e17021fa7..de6bb573d5b799f717195d93ccb48e62f6b49780 100644 (file)
@@ -3,6 +3,12 @@
 
 General:
 
+Changes to 1.37.25 release on 20 Jun 05:
+20Jun05:
+- Fix bug where Storage daemon gets confused about what
+  tape is mounted. (one line of code was inadvertently 
+  deleted).
+
 Changes to 1.37.24:
 18Jun05
 - DVD writing/reading seems to be mostly working.
index f0af40cf3a6c9889d35dc90d57c9294592ecf4c6..2ccb5a1e2c07eaec5b9382c80eab62803dd3e852 100644 (file)
@@ -7,24 +7,18 @@
  *
  *    Version $Id$
  */
-
 /*
    Copyright (C) 2003-2005 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as ammended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
index 2e11958ae3f5d6b4e180b337d733c73a4a9a6f5a..ac0dd6bab5a5d2d83cae64b399e23788c659fd8a 100644 (file)
@@ -83,6 +83,7 @@ int read_dev_volume_label(DCR *dcr)
          if (!dev->poll && jcr->label_errors++ > 100) {
             Jmsg(jcr, M_FATAL, 0, "Too many tries: %s", jcr->errmsg);
          }
+         Dmsg0(100, "return VOL_NAME_ERROR\n");
          return VOL_NAME_ERROR;
       }
       Dmsg0(30, "Leave read_volume_label() VOL_OK\n");
@@ -97,7 +98,7 @@ int read_dev_volume_label(DCR *dcr)
    if (!rewind_dev(dev)) {
       Mmsg(jcr->errmsg, _("Couldn't rewind device %s: ERR=%s\n"), 
          dev->print_name(), strerror_dev(dev));
-      Dmsg1(30, "%s", jcr->errmsg);
+      Dmsg1(30, "return VOL_NO_MEDIA: %s", jcr->errmsg);
       return VOL_NO_MEDIA;
    }
    bstrncpy(dev->VolHdr.Id, "**error**", sizeof(dev->VolHdr.Id));
@@ -122,6 +123,7 @@ int read_dev_volume_label(DCR *dcr)
          }
          empty_block(block);
          rewind_dev(dev);
+         Dmsg1(100, "return %d\n", stat);
          return stat;
       }
       if (stat != VOL_OK) {           /* Not an ANSI/IBM label, so re-read */
@@ -163,6 +165,7 @@ int read_dev_volume_label(DCR *dcr)
          return VOL_OK;
       }
       rewind_dev(dev);
+      Dmsg0(100, "return VOL_NO_LABEL\n");
       return VOL_NO_LABEL;
    }
 
@@ -181,7 +184,7 @@ int read_dev_volume_label(DCR *dcr)
        dev->VolHdr.VerNum != OldCompatibleBaculaTapeVersion2) {
       Mmsg(jcr->errmsg, _("Volume on %s has wrong Bacula version. Wanted %d got %d\n"),
          dev->print_name(), BaculaTapeVersion, dev->VolHdr.VerNum);
-      Dmsg1(30, "%s", jcr->errmsg);
+      Dmsg1(30, "VOL_VERSION_ERROR: %s", jcr->errmsg);
       return VOL_VERSION_ERROR;
    }
 
@@ -195,6 +198,7 @@ int read_dev_volume_label(DCR *dcr)
       if (!dev->poll && jcr->label_errors++ > 100) {
          Jmsg(jcr, M_FATAL, 0, "Too many tries: %s", jcr->errmsg);
       }
+      Dmsg0(100, "return VOL_LABEL_ERROR\n");
       return VOL_LABEL_ERROR;
    }
 
@@ -214,6 +218,7 @@ int read_dev_volume_label(DCR *dcr)
       if (!dev->poll && jcr->label_errors++ > 100) {
          Jmsg(jcr, M_FATAL, 0, "Too many tries: %s", jcr->errmsg);
       }
+      Dmsg0(100, "return VOL_NAME_ERROR\n");
       return VOL_NAME_ERROR;
    }
    Dmsg1(30, "Copy vol_name=%s\n", dev->VolHdr.VolumeName);
index 3f7d154cba76d27dd47a31812116a10f49bbf6e6..bcfb36da6ffcdad38551202bfb366824c5899600 100644 (file)
@@ -190,7 +190,7 @@ read_volume:
       return false;
    }
 
-   Dmsg2(100, "dirVol=%s dirStat=%s\n", dcr->VolumeName,
+   Dmsg2(100, "Want dirVol=%s dirStat=%s\n", dcr->VolumeName,
       dcr->VolCatInfo.VolCatStatus);
    /*
     * At this point, dev->VolCatInfo has what is in the drive, if anything,
@@ -230,6 +230,7 @@ read_volume:
       memcpy(&VolCatInfo, &dcr->VolCatInfo, sizeof(VolCatInfo));
       memcpy(&devVolCatInfo, &dev->VolCatInfo, sizeof(devVolCatInfo));
       /* Check if this is a valid Volume in the pool */
+      bstrncpy(dcr->VolumeName, dev->VolHdr.VolumeName, sizeof(dcr->VolumeName));
       if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_WRITE)) {
          /* Restore desired volume name, note device info out of sync */
          /* This gets the info regardless of the Pool */
index 2b07c919be0a66d055574247c85647cc1f1753b6..893aa54c3d3c4ab2d7e264c4e8510aff795ea685 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #undef  VERSION
-#define VERSION "1.37.24"
-#define BDATE   "18 June 2005"
-#define LSMDATE "18Jun05"
+#define VERSION "1.37.25"
+#define BDATE   "20 June 2005"
+#define LSMDATE "20Jun05"
 
 /* Debug flags */
 #undef  DEBUG
@@ -12,7 +12,7 @@
 #define TRACE_FILE 1
 
 /* If this is set stdout will not be closed on startup */
-/* #define DEVELOPER 1 */
+#define DEVELOPER 1