]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/block.c
kes Make sure valid argument passed to str_to_utime() where Arno
[bacula/bacula] / bacula / src / stored / block.c
index 69f9ab616b15e34f366b976fd6fd211e3fce2e66..2c5f5c9ff96487064bce61786c8c77436149c066 100644 (file)
@@ -570,8 +570,9 @@ bool write_block_to_dev(DCR *dcr)
    }
 
    /* We successfully wrote the block, now do housekeeping */
-
-   dev->VolCatInfo.VolCatBytes += block->binbuf;
+   Dmsg2(400, "VolCatBytes=%d newVolCatBytes=%d\n", (int)dev->VolCatInfo.VolCatBytes,
+      (int)(dev->VolCatInfo.VolCatBytes+wlen));
+   dev->VolCatInfo.VolCatBytes += wlen;         
    dev->VolCatInfo.VolCatBlocks++;
    dev->EndBlock = dev->block_num;
    dev->EndFile  = dev->file;
@@ -836,6 +837,10 @@ static bool do_dvd_size_checks(DCR *dcr)
          return false;
       }
    }
+
+   if (!dev->is_freespace_ok()) {
+      update_free_space_dev(dev);
+   }
    
    if (!dev->is_freespace_ok()) { /* Error while getting free space */
       char ed1[50], ed2[50];