]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix getmsg to handle additional forms of Progress messages
authorKern Sibbald <kern@sibbald.com>
Mon, 5 Jun 2017 16:25:12 +0000 (18:25 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 5 Jun 2017 16:25:12 +0000 (18:25 +0200)
bacula/src/dird/getmsg.c
bacula/src/filed/backup.c
bacula/src/filed/restore.c

index e05e63b584cde2f1bcb2e6b1977b270e81ad67cb..748a3d3bd5cc6ff5c62a05e79229dc1f1d969aa5 100644 (file)
@@ -279,6 +279,8 @@ int bget_dirmsg(BSOCK *bs)
          uint64_t bytes;
          if ((sscanf(bs->msg, "Progress JobId=%ld files=%ld bytes=%lld bps=%ld\n",
                 &JobId,  &files, &bytes, &bps) == 4) ||
+             (sscanf(bs->msg, "Progress JobId=x files=%ld bytes=%lld bps=%ld\n",
+                &files, &bytes, &bps) == 3) ||
              (sscanf(bs->msg, "Progress Job=x files=%ld bytes=%lld bps=%ld\n",
                 &files, &bytes, &bps) == 3)) {
             Dmsg2(900, "JobId=%d %s", jcr->JobId, bs->msg);
index 6e06cbd3d38f8c4833c812bece21359bbbfb0850..02c907b983b9529ac8fe6b262863104baa2be470 100644 (file)
@@ -245,8 +245,8 @@ int save_file(JCR *jcr, FF_PKT *ff_pkt, bool top_level)
       jcr->last_stat_time = now;
       jcr->stat_interval = 30;  /* Default 30 seconds */
    } else if (now >= jcr->last_stat_time + jcr->stat_interval) {
-      jcr->dir_bsock->fsend("Progress JobId=x files=%ld bytes=%lld bps=%ld\n",
-         jcr->JobFiles, jcr->JobBytes, jcr->LastRate);
+      jcr->dir_bsock->fsend("Progress JobId=%ld files=%ld bytes=%lld bps=%ld\n",
+         jcr->JobId, jcr->JobFiles, jcr->JobBytes, jcr->LastRate);
       jcr->last_stat_time = now;
    }
 
index 7e5a3c8e25d6d3e8a5fc7f4a23214d7cf7035e50..cedd5fa05be010297d740567719bda55e496be7e 100644 (file)
@@ -455,8 +455,8 @@ void do_restore(JCR *jcr)
          jcr->last_stat_time = now;
          jcr->stat_interval = 30;  /* Default 30 seconds */
       } else if (now >= jcr->last_stat_time + jcr->stat_interval) {
-         jcr->dir_bsock->fsend("Progress JobId=x files=%ld bytes=%lld bps=%ld\n",
-            jcr->JobFiles, jcr->JobBytes, jcr->LastRate);
+         jcr->dir_bsock->fsend("Progress JobId=%ld files=%ld bytes=%lld bps=%ld\n",
+            jcr->JobId, jcr->JobFiles, jcr->JobBytes, jcr->LastRate);
          jcr->last_stat_time = now;
       }