From: Kern Sibbald Date: Fri, 1 Dec 2006 07:51:55 +0000 (+0000) Subject: kes Initialize msg_type to M_INFO in migration. Pointed out by X-Git-Tag: Release-7.0.0~7317 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b89e3960f8c23d413786ec13e875bbde1563a8b8;hp=bf2271cfc687fd9d202d57086b18b223df8f0fc9;p=bacula%2Fbacula kes Initialize msg_type to M_INFO in migration. Pointed out by Robert Nelson. kes Add some fflush() statements for debug output. This should not really be necessary and defeats buffering but users continue to complain. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3716 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/AUTHORS b/bacula/AUTHORS index 182b6ec899..42e4ffa8fb 100644 --- a/bacula/AUTHORS +++ b/bacula/AUTHORS @@ -25,6 +25,7 @@ Chris Lee Christian Masopust Christopher Hull Dan Langille +Daniele Eccher David Boyes David Duchscher D. Scott Barninger diff --git a/bacula/kernstodo b/bacula/kernstodo index 4571380e34..e97927a303 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -92,6 +92,8 @@ For 1.39: .move transfer device=xxx fromslot=yyy toslot=zzz Low priority: +- After pruning, check to see if the Volume retention period has + expired. - Check to see if jcr->stime is lost during rescheduling of jobs in jobq.c - Fix re-read of last block to check if job has actually written diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index e1a0442a80..641d8fc9c5 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -322,7 +322,7 @@ void backup_cleanup(JCR *jcr, int TermCode) char ec6[30], ec7[30], ec8[30], elapsed[50]; char term_code[100], fd_term_msg[100], sd_term_msg[100]; const char *term_msg; - int msg_type; + int msg_type = M_INFO; MEDIA_DBR mr; CLIENT_DBR cr; double kbps, compression; @@ -357,7 +357,6 @@ void backup_cleanup(JCR *jcr, int TermCode) update_bootstrap_file(jcr); - msg_type = M_INFO; /* by default INFO message */ switch (jcr->JobStatus) { case JS_Terminated: if (jcr->Errors || jcr->SDErrors) { diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c index 3c02be1bb8..8d2dd6500e 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -961,7 +961,7 @@ void migration_cleanup(JCR *jcr, int TermCode) char ec6[50], ec7[50], ec8[50]; char term_code[100], sd_term_msg[100]; const char *term_msg; - int msg_type; + int msg_type = M_INFO; MEDIA_DBR mr; double kbps; utime_t RunTime; diff --git a/bacula/src/dird/restore.c b/bacula/src/dird/restore.c index 1b39576e51..e0ed74cb06 100644 --- a/bacula/src/dird/restore.c +++ b/bacula/src/dird/restore.c @@ -222,7 +222,7 @@ void restore_cleanup(JCR *jcr, int TermCode) char ec1[30], ec2[30], ec3[30]; char term_code[100], fd_term_msg[100], sd_term_msg[100]; const char *term_msg; - int msg_type; + int msg_type = M_INFO; double kbps; Dmsg0(20, "In restore_cleanup\n"); @@ -236,7 +236,6 @@ void restore_cleanup(JCR *jcr, int TermCode) update_job_end_record(jcr); - msg_type = M_INFO; /* by default INFO message */ switch (TermCode) { case JS_Terminated: if (jcr->ExpectedFiles > jcr->jr.JobFiles) { diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index dc91de9e47..9394988874 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -765,12 +765,14 @@ send_to_file: if (type != M_ABORT && type != M_ERROR_TERM) { /* already printed */ fputs(dt, stdout); fputs(msg, stdout); + fflush(stdout); } break; case MD_STDERR: Dmsg1(850, "STDERR for following msg: %s", msg); fputs(dt, stderr); fputs(msg, stderr); + fflush(stdout); break; default: break; @@ -860,6 +862,7 @@ d_msg(const char *file, int line, int level, const char *fmt,...) } } else { /* not tracing */ fputs(buf, stdout); + fflush(stdout); } } } @@ -916,6 +919,7 @@ p_msg(const char *file, int line, int level, const char *fmt,...) bvsnprintf(buf+len, sizeof(buf)-len, (char *)fmt, arg_ptr); va_end(arg_ptr); fputs(buf, stdout); + fflush(stdout); } diff --git a/bacula/src/version.h b/bacula/src/version.h index 9284a71cbd..cb36b2c6de 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "1.39.29" -#define BDATE "26 November 2006" -#define LSMDATE "26Nov06" +#define BDATE "28 November 2006" +#define LSMDATE "28Nov06" #define PROG_COPYRIGHT "Copyright (C) %d-2006 Free Software Foundation Europe e.V.\n" #define BYEAR "2006" /* year for copyright messages in progs */ diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 5c49c11dac..db27dc3e1f 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,6 +1,12 @@ Technical notes on version 1.39 General: +28Nov06 +kes Initialize msg_type to M_INFO in migration. Pointed out by + Robert Nelson. +kes Add some fflush() statements for debug output. This should not + really be necessary and defeats buffering but users continue + to complain. 27Nov06 kes More copyright changes. kes Make sure we don't detach from the despool read device since it