X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fdircmd.c;h=411d6687a369d7fd622b79417c907cf177bfe490;hb=ada27b1a435802523f568fd94b81e393dcbabe71;hp=95a05e075abd295baa0db0702fcedf11c9656cf1;hpb=b4d29f1c646a294477ebc973060295f724f3bb17;p=bacula%2Fbacula diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 95a05e075a..411d6687a3 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2007 Free Software Foundation Europe e.V. + Copyright (C) 2001-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -515,6 +515,7 @@ bail_out: if (!dev->is_open()) { dev->clear_volhdr(); } + volume_unused(dcr); /* no longer using volume */ give_back_device_lock(dev, &hold); return; } @@ -548,6 +549,7 @@ static bool read_label(DCR *dcr) ok = false; break; } + volume_unused(dcr); give_back_device_lock(dev, &hold); return ok; } @@ -913,7 +915,7 @@ static bool release_cmd(JCR *jcr) } else { /* device not being used */ Dmsg0(90, "Device not in use, releaseing\n"); unload_autochanger(dcr, -1); - release_volume(dcr); + dcr->release_volume(); dir->fsend(_("3022 Device %s released.\n"), dev->print_name()); }