]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak
authorKern Sibbald <kern@sibbald.com>
Sat, 31 May 2008 07:11:43 +0000 (07:11 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 31 May 2008 07:11:43 +0000 (07:11 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7068 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/autochanger.c

index b6225613356fac309f7002752ebb99e71494c173..9c0c6b8302dabea813fb34f115c0eb3d76a00562 100644 (file)
@@ -453,13 +453,12 @@ bool unload_dev(DCR *dcr, DEVICE *dev)
 
    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();