]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/append.c
Apply patch from Richard Mortimer to ensure that the number
[bacula/bacula] / bacula / src / stored / append.c
index b82d023dccf402760afcbc2ad9245a5051e9fd30..9910ce1c0e54584170d2a431a9b441c830839dee 100644 (file)
@@ -80,7 +80,7 @@ bool do_append_data(JCR *jcr)
    if (dev->VolCatInfo.VolCatName[0] == 0) {
       Pmsg0(000, _("NULL Volume name. This shouldn't happen!!!\n"));
    }
-   Dmsg1(20, "Begin append device=%s\n", dev->print_name());
+   Dmsg1(50, "Begin append device=%s\n", dev->print_name());
 
    begin_data_spool(dcr);
    begin_attribute_spool(jcr);
@@ -253,12 +253,13 @@ bool do_append_data(JCR *jcr)
 
    time_t job_elapsed = time(NULL) - jcr->run_time;
 
-   if (job_elapsed == 0)
+   if (job_elapsed <= 0) {
       job_elapsed = 1;
+   }
 
    Jmsg(dcr->jcr, M_INFO, 0, _("Job write elapsed time = %02d:%02d:%02d, Transfer rate = %s bytes/second\n"),
          job_elapsed / 3600, job_elapsed % 3600 / 60, job_elapsed % 60,
-         edit_uint64_with_commas(jcr->dcr->job_spool_size / job_elapsed, ec));
+         edit_uint64_with_suffix(jcr->JobBytes / job_elapsed, ec));
 
    /* Create Job status for end of session label */
    set_jcr_job_status(jcr, ok?JS_Terminated:JS_ErrorTerminated);