Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
free_volume(dev); /* Free any volume associated with this drive */
free_pool_memory(changer);
}
- dev->clear_unload();
+ if (ok) {
+ dev->clear_unload();
+ }
return ok;
}
save_dev = dcr->dev; /* save dcr device */
dcr->dev = dev; /* temporarily point dcr at other device */
- save_slot = dcr->VolCatInfo.Slot;
if (dev->get_slot() <= 0 && get_autochanger_loaded_slot(dcr) <= 0) {
- dcr->VolCatInfo.Slot = save_slot;
dcr->dev = save_dev;
return false;
}
+ save_slot = dcr->VolCatInfo.Slot;
dcr->VolCatInfo.Slot = dev->get_slot();
dev->dlock();
Dmsg2(100, "Slot %d unloaded %s\n", dev->get_slot(), dev->print_name());
dev->set_slot(0); /* nothing loaded */
}
- dev->clear_unload();
+ if (ok) {
+ dev->clear_unload();
+ }
unlock_changer(dcr);
dev->dunlock();