X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fread_record.c;h=8cd7b4f0b56e1789a0b92c64372dfeeb318eeb9a;hb=1bf3065ec3bd9c1d65a14ee98b6e42bf7077ba16;hp=6be9c15d5c9dc4f13f073fcaf3f4123d3006bbbf;hpb=3083e1a976968f66a025c160566112a49123721a;p=bacula%2Fbacula diff --git a/bacula/src/stored/read_record.c b/bacula/src/stored/read_record.c index 6be9c15d5c..8cd7b4f0b5 100644 --- a/bacula/src/stored/read_record.c +++ b/bacula/src/stored/read_record.c @@ -82,6 +82,7 @@ bool read_records(DCR *dcr, DEV_RECORD *trec = new_record(); Jmsg(jcr, M_INFO, 0, _("End of Volume at file %u on device %s, Volume \"%s\"\n"), dev->file, dev->print_name(), dcr->VolumeName); + volume_unused(dcr); /* mark volume unused */ if (!mount_cb(dcr)) { Jmsg(jcr, M_INFO, 0, _("End of all volumes.\n")); ok = false; /* Stop everything */ @@ -227,11 +228,13 @@ bool read_records(DCR *dcr, * he wants to know if they matched the bsr, then he must * check the match_stat in the record */ ok = record_cb(dcr, rec); +#ifdef xxx /* * If this is the end of the Session (EOS) for this record * we can remove the record. Note, there is a separate * record to read each session. If a new session is seen * a new record will be created at approx line 157 above. + * However, it seg faults in the for line at lineno 196. */ if (rec->FileIndex == EOS_LABEL) { Dmsg2(dbglvl, "Remove EOS rec. SI=%d ST=%d\n", rec->VolSessionId, @@ -239,6 +242,7 @@ bool read_records(DCR *dcr, recs->remove(rec); free_record(rec); } +#endif continue; } /* end if label record */