From: Kern Sibbald Date: Mon, 5 Jun 2017 16:25:12 +0000 (+0200) Subject: Fix getmsg to handle additional forms of Progress messages X-Git-Tag: Release-7.9.2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b9ae30654be2dde1970ecddad52b9081d9d9ace;p=bacula%2Fbacula Fix getmsg to handle additional forms of Progress messages --- diff --git a/bacula/src/dird/getmsg.c b/bacula/src/dird/getmsg.c index e05e63b584..748a3d3bd5 100644 --- a/bacula/src/dird/getmsg.c +++ b/bacula/src/dird/getmsg.c @@ -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); diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 6e06cbd3d3..02c907b983 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -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; } diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index 7e5a3c8e25..cedd5fa05b 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -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; }