/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2009 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.
if (reserve_volume(dcr, dev->VolHdr.VolumeName) == NULL) {
Mmsg2(jcr->errmsg, _("Could not reserve volume %s on %s\n"),
dev->VolHdr.VolumeName, dev->print_name());
+ Dmsg2(150, "Could not reserve volume %s on %s\n", dev->VolHdr.VolumeName, dev->print_name());
stat = VOL_NAME_ERROR;
goto bail_out;
}
}
/* Set the new filename for open, ... */
- bstrncpy(dev->VolCatInfo.VolCatName, VolName, sizeof(dev->VolCatInfo.VolCatName));
- bstrncpy(dcr->VolCatInfo.VolCatName, VolName, sizeof(dcr->VolCatInfo.VolCatName));
+ dev->setVolCatName(VolName);
+ dcr->setVolCatName(VolName);
Dmsg1(150, "New VolName=%s\n", VolName);
if (dev->open(dcr, OPEN_READ_WRITE) < 0) {
/* If device is not tape, attempt to create it */
if (reserve_volume(dcr, VolName) == NULL) {
Mmsg2(dcr->jcr->errmsg, _("Could not reserve volume %s on %s\n"),
dev->VolHdr.VolumeName, dev->print_name());
+ Dmsg1(100, "%s", dcr->jcr->errmsg);
goto bail_out;
}
dev = dcr->dev; /* may have changed in reserve_volume */
}
Dmsg1(150, "wrote vol label to block. Vol=%s\n", dcr->VolumeName);
+ dev->setVolCatInfo(false);
dev->VolCatInfo.VolCatBytes = 0; /* reset byte count */
/*
}
Dmsg1(150, "dir_update_vol_info. Set Append vol=%s\n", dcr->VolumeName);
bstrncpy(dev->VolCatInfo.VolCatStatus, "Append", sizeof(dev->VolCatInfo.VolCatStatus));
- bstrncpy(dev->VolCatInfo.VolCatName, dcr->VolumeName, sizeof(dev->VolCatInfo.VolCatName));
+ dev->setVolCatName(dcr->VolumeName);
if (!dir_update_volume_info(dcr, true, true)) { /* indicate doing relabel */
return false;
}
/* Added in VerNum 10 */
ser_string(jcr->Job); /* Unique name of this Job */
ser_string(jcr->fileset_name);
- ser_uint32(jcr->get_JobType());
- ser_uint32(jcr->get_JobLevel());
+ ser_uint32(jcr->getJobType());
+ ser_uint32(jcr->getJobLevel());
/* Added in VerNum 11 */
ser_string(jcr->fileset_md5);