]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/mount.c
Make btape fill/unfill work
[bacula/bacula] / bacula / src / stored / mount.c
index e06e3cb1f6eea00606355a1e509bc6b20358bf12..e02f791944c982fe6acfa71d0512847a951b0a4d 100644 (file)
@@ -131,7 +131,7 @@ mount_next_vol:
 
    dev->state &= ~(ST_APPEND|ST_READ|ST_EOT|ST_WEOT|ST_EOF);
 
-   jcr->VolFirstFile = jcr->JobFiles; /* first update of Vol FileIndex */
+   jcr->VolFirstIndex = jcr->JobFiles; /* first update of Vol FileIndex */
    for ( ;; ) {
       int vol_label_status;
       autochanger = autoload_device(jcr, dev, 1, NULL);
@@ -244,12 +244,7 @@ mount_error:
         /* Send error message */
          Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);                         
         if (autochanger) {
-            Jmsg(jcr, M_ERROR, 0, _("Autochanger Volume \"%s\" not found in slot %d.\n\
-    Setting slot to zero in catalog.\n"),
-              jcr->VolCatInfo.VolCatName, jcr->VolCatInfo.Slot);
-           jcr->VolCatInfo.Slot = 0; /* invalidate slot */
-            Dmsg0(200, "update vol info in mount\n");
-           dir_update_volume_info(jcr, &jcr->VolCatInfo, 1);  /* set slot */
+           invalidate_slot_in_catalog(jcr);
         }
          Dmsg0(100, "Default\n");
         goto mount_next_vol;
@@ -311,6 +306,7 @@ mount_error:
       dev->VolCatInfo.VolCatFiles = 0;
       dev->VolCatInfo.VolCatErrors = 0;
       dev->VolCatInfo.VolCatBlocks = 0;
+      dev->VolCatInfo.VolCatRBytes = 0;
       if (recycle) {
         dev->VolCatInfo.VolCatMounts++;  
         dev->VolCatInfo.VolCatRecycles++;