]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dircmd.c
Change copyright as per agreement with FSFE
[bacula/bacula] / bacula / src / stored / dircmd.c
index b86c1d7f41d8ace9325670ee278ff6503dfd18de..c7b03140846ef64d724411c77013014d4160e563 100644 (file)
@@ -1,8 +1,7 @@
 /*
    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.
@@ -576,12 +575,6 @@ static bool do_label(JCR *jcr, int relabel)
          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));
@@ -615,8 +608,8 @@ static bool do_label(JCR *jcr, int relabel)
             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());
       }