/*
Bacula(R) - The Network Backup Solution
- Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2001-2014 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2016 Kern Sibbald
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
dev = dcr->dev;
ok = true;
dev->Lock(); /* Use P to avoid indefinite block */
-#ifdef DEVELOPER
- if (chk_dbglvl(DT_VOLUME)) {
- Dmsg0(0, "Waiting few seconds to force a bug...\n");
- bmicrosleep(30, 0);
- }
-#endif
max_jobs = dev->max_concurrent_jobs;
dev->max_concurrent_jobs = 1;
bstrncpy(dcr->VolumeName, newname, sizeof(dcr->VolumeName));
label_volume_if_ok(dcr, oldname, newname, poolname, slot, relabel);
}
dev->max_concurrent_jobs = max_jobs;
+ volume_unused(dcr);
dev->Unlock();
- free_volume(dcr->dev);
} else {
dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), dev_name.c_str());
}