git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6792
91ce42f0-d328-0410-95d8-
f526ca767f89
DEVICE *save_dev;
int save_slot;
- if (!changer) {
+ if (!changer || dev->Slot <= 0) {
return false;
}
dev->dlock();
* volume to our drive.
*/
if (swap_dev) {
+ Dmsg1(150, "Swap vol=%d\n", swap_dev->vol->vol_name);
dev->vol = swap_dev->vol; /* take its volume */
swap_dev->vol = NULL;
unload_dev(dcr, swap_dev);
vol = NULL; /* device busy */
goto get_out;
}
+ } else {
+ dev->vol = vol;
}
+ } else {
+ dev->vol = vol; /* point to newly inserted volume */
}
- dev->vol = vol;
get_out:
if (vol) {
General:
10Apr08
+kes Tweak volume swapping code so it works.
kes Correct name overloading in mount.c
kes Replace released flag in VOLRES with reserved and add access
methods for the VOLRES class.