]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/acquire.c
kes Fix mtx-changer to detect both versions of Ubuntu (Debian)
[bacula/bacula] / bacula / src / stored / acquire.c
index 42f15bd7655cb48cf62840d6abf3693ea2d73da6..4af83a3343b45eaa1ae6cd16881380bc531f8b42 100644 (file)
@@ -70,7 +70,6 @@ bool acquire_device_for_read(DCR *dcr)
          dev->num_writers, jcr->JobId);
       goto get_out;
    }
-   dev->clear_unload();
 
    /* Find next Volume, if any */
    vol = jcr->VolList;
@@ -173,6 +172,8 @@ bool acquire_device_for_read(DCR *dcr)
       }
    }
 
+   dev->clear_unload();
+
    if (reserve_volume(dcr, dcr->VolumeName) == NULL) {
       Dmsg2(100, "Could not reserve volume %s on %s\n", dcr->VolumeName,
             dcr->dev->print_name());