]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
fix #10137 Volume XXX in unavailable now.
authorAlain Spineux <alain@baculasystems.com>
Wed, 17 May 2023 16:11:26 +0000 (18:11 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:01 +0000 (13:57 +0200)
- I put my "case"  in the middle of a "fall through" cascade of "case"
- I moved it up above the "cascade"
- I'm not able to reproduce the problem with volumes on disk
- 100% sure that this will change the behavior at the customer level

bacula/src/stored/mount.c

index 15e411f453f967180b561b719234ea83ae8c57ee..909025c249eaf1f2d0d25d451a9b2954cc4e62e4 100644 (file)
@@ -524,6 +524,10 @@ int DCR::check_volume_label(bool &ask, bool &autochanger)
          goto check_next_volume;
       }
       break;                /* got a Volume */
+   case VOL_ENC_ERROR:
+      volume_is_unavailable();
+      goto check_next_volume;
+      break;
    /*
     * At this point, we assume we have a blank tape mounted.
     */
@@ -541,10 +545,6 @@ int DCR::check_volume_label(bool &ask, bool &autochanger)
          break;
       }
       /* NOTE! Fall-through wanted. */
-   case VOL_ENC_ERROR:
-      volume_is_unavailable();
-      goto check_next_volume;
-      break;
    case VOL_NO_MEDIA:
    default:
       Dmsg0(200, "VOL_NO_MEDIA or default.\n");