]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/bscan.c
Tweak SD debug code
[bacula/bacula] / bacula / src / stored / bscan.c
index 9372ab689504288b12fc61f07fc12533f962227f..854f70dffa4d77dd01eaa7cd25c9b80707047b90 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2010 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.
@@ -668,11 +668,6 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
          Emsg0(M_ERROR_TERM, 0, _("Cannot continue.\n"));
       }
 
-      if (attr->file_index != rec->FileIndex) {
-         Emsg2(M_ERROR_TERM, 0, _("Record header file index %ld not equal record index %ld\n"),
-            rec->FileIndex, attr->file_index);
-      }
-
       if (verbose > 1) {
          decode_stat(attr->attr, &attr->statp, &attr->LinkFI);
          build_attr_output_fnames(bjcr, attr);
@@ -914,6 +909,7 @@ static int create_media_record(B_DB *db, MEDIA_DBR *mr, VOLUME_LABEL *vl)
    mr->VolRetention = 365 * 3600 * 24; /* 1 year */
    mr->Enabled = 1;
    if (vl->VerNum >= 11) {
+      mr->set_first_written = true; /* Save FirstWritten during update_media */
       mr->FirstWritten = btime_to_utime(vl->write_btime);
       mr->LabelDate    = btime_to_utime(vl->label_btime);
    } else {