From b422c38a0b066f27a1b1fa09f2d0f2698b83b19b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 23 Feb 2004 10:12:59 +0000 Subject: [PATCH] Fix Win32 status.c git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1075 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/status.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bacula/src/filed/status.c b/bacula/src/filed/status.c index a2e94730fe..d33c536e8c 100755 --- a/bacula/src/filed/status.c +++ b/bacula/src/filed/status.c @@ -108,7 +108,7 @@ static void do_status(void sendit(const char *msg, int len, void *sarg), void *a if (sec <= 0) { sec = 1; } - bps = njcr->JobBytes / sec; + bps = (int)(njcr->JobBytes / sec); len = Mmsg(&msg, _(" Files=%s Bytes=%s Bytes/sec=%s\n"), edit_uint64_with_commas(njcr->JobFiles, b1), edit_uint64_with_commas(njcr->JobBytes, b2), @@ -347,10 +347,12 @@ char *bac_status(int stat) { JCR *njcr; char *termstat = _("Bacula Idle"); + struct s_last_job *job; bacstat = 0; if (last_jobs->size() > 0) { - switch (last_job.JobStatus) { + job = (struct s_last_job *)last_jobs->first(); + switch (job->JobStatus) { case JS_Canceled: bacstat = -1; termstat = _("Last Job Canceled"); @@ -365,7 +367,7 @@ char *bac_status(int stat) } Dmsg0(1000, "Begin bac_status jcr loop.\n"); lock_jcr_chain(); - for (njcr=NULL; (njcr=get_next_jcr(njcr)); ) { + foreach_jcr(njcr) { if (njcr->JobId != 0) { bacstat = 1; termstat = _("Bacula Running"); -- 2.39.5