X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=bacula%2Fsrc%2Fstored%2Fbutil.c;h=43a8088a8f909425cd9c8dacddb39afc687db04c;hb=70fe74e091b2426c2209110ada86566ee2f89c97;hp=7a8da3571c60c9f5681510db1e31d4b046eafca2;hpb=5acf2fea2740c922a094c4e67c575686844f7e71;p=bacula%2Fbacula diff --git a/bacula/src/stored/butil.c b/bacula/src/stored/butil.c index 7a8da3571c..43a8088a8f 100644 --- a/bacula/src/stored/butil.c +++ b/bacula/src/stored/butil.c @@ -12,7 +12,7 @@ * Version $Id$ */ /* - Copyright (C) 2000-2005 Kern Sibbald + Copyright (C) 2000-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -93,6 +93,7 @@ JCR *setup_jcr(const char *name, char *dev_name, BSR *bsr, pm_strcpy(jcr->fileset_md5, "Dummy.fileset.md5"); init_autochangers(); + create_volume_list(); dcr = setup_to_access_device(jcr, dev_name, VolumeName, mode); if (!dcr) { @@ -120,6 +121,8 @@ static DCR *setup_to_access_device(JCR *jcr, char *dev_name, DCR *dcr; char VolName[MAX_NAME_LENGTH]; + init_reservations_lock(); + /* * If no volume name already given and no bsr, and it is a file, * try getting name from Filename @@ -159,6 +162,7 @@ static DCR *setup_to_access_device(JCR *jcr, char *dev_name, } device->dev = dev; dcr = new_dcr(jcr, dev); + jcr->dcr = dcr; if (VolName[0]) { bstrncpy(dcr->VolumeName, VolName, sizeof(dcr->VolumeName)); }