if (dev->VolCatInfo.VolCatName[0] == 0) {
Pmsg0(000, _("NULL Volume name. This shouldn't happen!!!\n"));
}
- Dmsg1(20, "Begin append device=%s\n", dev->print_name());
+ Dmsg1(50, "Begin append device=%s\n", dev->print_name());
begin_data_spool(dcr);
begin_attribute_spool(jcr);
if (!write_block_to_device(dcr)) {
Dmsg2(90, "Got write_block_to_dev error on device %s. %s\n",
dev->print_name(), dev->bstrerror());
- Jmsg2(jcr, M_FATAL, 0, _("Fatal append error on device %s: ERR=%s\n"),
- dev->print_name(), dev->bstrerror());
ok = false;
break;
}
if (!ok) {
discard_data_spool(dcr);
} else {
+ /* Note: if commit is OK, the device will remain locked */
commit_data_spool(dcr);
}
ok = dvd_close_job(dcr); /* do DVD cleanup if any */
}
- /* Release the device -- and send final Vol info to DIR */
+ /*
+ * Release the device -- and send final Vol info to DIR
+ * and unlock it.
+ */
release_device(dcr);
if (!ok || job_canceled(jcr)) {