]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bug where SD did not ask operator if the device could not
authorKern Sibbald <kern@sibbald.com>
Sat, 21 Jun 2008 09:49:53 +0000 (09:49 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 21 Jun 2008 09:49:53 +0000 (09:49 +0000)
     be opened. Reported by Eric.

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

bacula/src/stored/mount.c
bacula/src/version.h
bacula/technotes-2.3

index 98c3b80b3eb7780810439dd0af747f52aed2414e..26d0cb224f174fb5c22731c9d6e9394280f9cfb2 100644 (file)
@@ -159,6 +159,7 @@ mount_next_vol:
    } else {
       autochanger = false;
       VolCatInfo.Slot = 0;
+      ask = true;
    }
    Dmsg1(150, "autoload_dev returns %d\n", autochanger);
    /*
@@ -177,7 +178,6 @@ mount_next_vol:
       ask = false;
    }
    Dmsg2(150, "Ask=%d autochanger=%d\n", ask, autochanger);
-   dev->must_unload();       /* release next time if we "recurse" */
 
    if (ask && !dir_ask_sysop_to_mount_volume(dcr, ST_APPEND)) {
       Dmsg0(150, "Error return ask_sysop ...\n");
@@ -225,15 +225,20 @@ mount_next_vol:
       if (try_autolabel(false) == try_read_vol) {
          break;                       /* created a new volume label */
       }
+      dev->set_unload();              /* force ask sysop */
+      ask = true;
+      goto mount_next_vol;
+#ifdef xxx
       /* If DVD, ignore the error, very often you cannot open the device
        * (when there is no DVD, or when the one inserted is a wrong one) */
       if (dev->poll || dev->is_dvd()) {
          goto mount_next_vol;
       } else {
-         Jmsg(jcr, M_ERROR, 0, _("Could not open device %s: ERR=%s\n"),
+         Jmsg2(jcr, M_ERROR, 0, _("Could not open device %s: ERR=%s\n"),
             dev->print_name(), dev->print_errmsg());
          goto bail_out;
       }
+#endif 
    }
 
    /*
@@ -243,6 +248,7 @@ read_volume:
 
    switch (check_volume_label(ask, autochanger)) {
    case check_next_vol:
+      dev->set_unload();                 /* want a different Volume */
       goto mount_next_vol;
    case check_read_vol:
       goto read_volume;
index 38184a7201fb490671cdd86a26ee8dc976191bd6..df9bb20460388764cf118a4585ff230ef2c0d9fb 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.4.1"
-#define BDATE   "19 June 2008"
-#define LSMDATE "19Jun08"
+#define BDATE   "20 June 2008"
+#define LSMDATE "20Jun08"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
index a0935c96bbf9546f07dc9176c32463a30ad445be..3d92b99976aef7f9f803a70d7bde1caa03c0fff6 100644 (file)
@@ -1,6 +1,9 @@
               Technical notes on version 2.2
 
 General:
+20Jun08
+kes  Fix bug where SD did not ask operator if the device could not
+     be opened. Reported by Eric.
 19Jun08
 kes  Add dbuser to DIR conf file (replaces user).
 kes  Add --with-db-password to ./configure