* Cancel Job if too many label errors
* => we are in a loop
*/
- if (jcr->label_errors > 100) {
- set_jcr_job_status(jcr, JS_ErrorTerminated);
+ if (jcr->label_errors++ > 100) {
Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
}
return jcr->label_status = VOL_NAME_ERROR;
}
strcpy(dev->VolHdr.Id, "**error**");
- /* Read the device label block */
+ /* Read the Volume label block */
record = new_record();
Dmsg0(90, "Big if statement in read_volume_label\n");
- if (!read_block_from_dev(dev, block)) {
+ if (!read_block_from_dev(jcr, dev, block, NO_BLOCK_NUMBER_CHECK)) {
Mmsg(&jcr->errmsg, _("Volume on %s is not a Bacula labeled Volume, \
because:\n %s"), dev_name(dev), strerror_dev(dev));
} else if (!read_record_from_block(block, record)) {
* Cancel Job if too many label errors
* => we are in a loop
*/
- if (jcr->label_errors > 100) {
- set_jcr_job_status(jcr, JS_ErrorTerminated);
+ if (jcr->label_errors++ > 100) {
Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
}
return jcr->label_status = VOL_NAME_ERROR;