]> git.sur5r.net Git - bacula/bacula/commitdiff
Make spool size max message more explicit
authorKern Sibbald <kern@sibbald.com>
Tue, 25 Dec 2012 13:48:28 +0000 (14:48 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:51:05 +0000 (14:51 +0200)
bacula/src/stored/spool.c

index 395bd48c382b91d4a752d80d4f9dd8bc372e4a62..42868f9e2de825366d44ead7c90a1f28a6422952 100644 (file)
@@ -475,13 +475,18 @@ bool write_block_to_spool_file(DCR *dcr)
    }
    V(mutex);
    if (despool) {
-      char ec1[30], ec2[30], ec3[30], ec4[30];
-      Jmsg(dcr->jcr, M_INFO, 0, _("User specified spool size reached: "
-         "JobSpoolSize=%s MaxJobSpool=%s DevSpoolSize=%s MaxDevSpool=%s\n"),
-         edit_uint64_with_commas(dcr->job_spool_size, ec1),
-         edit_uint64_with_commas(dcr->max_job_spool_size, ec2),
-         edit_uint64_with_commas(dcr->dev->spool_size, ec3),
-         edit_uint64_with_commas(dcr->dev->max_spool_size, ec4));
+      char ec1[30], ec2[30];
+      if (dcr->max_job_spool_size > 0) {
+         Jmsg(dcr->jcr, M_INFO, 0, _("User specified Job spool size reached: "
+            "JobSpoolSize=%s MaxJobSpoolSize=%s\n"),
+            edit_uint64_with_commas(dcr->job_spool_size, ec1),
+            edit_uint64_with_commas(dcr->max_job_spool_size, ec2));
+      } else {
+         Jmsg(dcr->jcr, M_INFO, 0, _("User specified Device spool size reached: "
+            "DevSpoolSize=%s MaxDevSpoolSize=%s\n"),
+            edit_uint64_with_commas(dcr->dev->spool_size, ec1),
+            edit_uint64_with_commas(dcr->dev->max_spool_size, ec2));
+      }
 
       if (!despool_data(dcr, false)) {
          Pmsg0(000, _("Bad return from despool in write_block.\n"));