From eea5026f2da2dcb394d5165aeeec493357f681ba Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 2 Aug 2006 15:42:45 +0000 Subject: [PATCH] kes Change the name of the technical notes file from kes-1.39 to technotes-1.39. Prefix my messages with 'kes '. kes Allow dequeue_messages() to be called twice. Should fix bug # 649. kes Add Job type to bscan Job information output. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3227 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 5 +++-- bacula/src/lib/message.c | 6 ++++++ bacula/src/stored/bscan.c | 4 ++-- bacula/src/version.h | 2 +- bacula/{kes-1.39 => technotes-1.39} | 7 ++++++- 5 files changed, 18 insertions(+), 6 deletions(-) rename bacula/{kes-1.39 => technotes-1.39} (99%) diff --git a/bacula/kernstodo b/bacula/kernstodo index 9379461ad5..cfc50cb979 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -24,11 +24,14 @@ Document: - Add example of proper index output to doc. show index from File; - Correct the Include syntax in the m4.xxx files in examples/conf +- Document JobStatus and Termination codes. Priority: For 1.39: +- Try turning on disk seek code. - Possibly turn on St. Bernard code. +- Fix bscan to report the JobType when restoring a job. - Fix bextract to restore ACLs, or better yet, use common routines. - Do we migrate appendable Volumes? @@ -38,7 +41,6 @@ For 1.39: - Fix re-read of last block to check if job has actually written a block, and check if block was written by a different job (i.e. multiple simultaneous jobs writing). -- JobStatus and Termination codes. - Some users claim that they must do two prune commands to get a Volume marked as purged. - Print warning message if LANG environment variable does not specify @@ -61,7 +63,6 @@ For 1.39: Low priority: - Get Perl replacement for bregex.c - - Given all the problems with FIFOs, I think the solution is to do something a little different, though I will look at the code and see if there is not some simple solution (i.e. some bug that was introduced). What might be a better diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index ca15715c63..6188e54edf 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -1289,12 +1289,18 @@ void dequeue_messages(JCR *jcr) { MQUEUE_ITEM *item; P(msg_queue_mutex); + if (!jcr->msg_queue) { + goto bail_out; + } jcr->dequeuing = true; foreach_dlist(item, jcr->msg_queue) { Jmsg(jcr, item->type, item->mtime, "%s", item->msg); } jcr->msg_queue->destroy(); + jcr->msg_queue = NULL; jcr->dequeuing = false; + +bail_out: V(msg_queue_mutex); } diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index 16b17d291d..eb7856fdcc 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -1072,8 +1072,8 @@ static int update_job_record(B_DB *db, JOB_DBR *jr, SESSION_LABEL *elabel, return 0; } if (verbose) { - Pmsg2(000, _("Updated Job termination record for JobId=%u TermStat=%c\n"), jr->JobId, - jr->JobStatus); + Pmsg3(000, _("Updated Job termination record for JobId=%u Level=%s TermStat=%c\n"), + jr->JobId, job_level_to_str(mjcr->JobLevel), jr->JobStatus); } if (verbose > 1) { const char *term_msg; diff --git a/bacula/src/version.h b/bacula/src/version.h index 4d3b26caf8..a27fae9f71 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -30,7 +30,7 @@ /* #define DEBUG_MUTEX 1 */ /* Check if header of tape block is zero before writing */ -#define DEBUG_BLOCK_ZEROING 1 +/* #define DEBUG_BLOCK_ZEROING 1 */ /* #define FULL_DEBUG 1 */ /* normally on for testing only */ diff --git a/bacula/kes-1.39 b/bacula/technotes-1.39 similarity index 99% rename from bacula/kes-1.39 rename to bacula/technotes-1.39 index 39f2b9812f..8781e0d40d 100644 --- a/bacula/kes-1.39 +++ b/bacula/technotes-1.39 @@ -1,7 +1,12 @@ Technical notes on version 1.39 - Kern Sibbald General: +02Aug06 +kes Change the name of the technical notes file from kes-1.39 to + technotes-1.39. Prefix my messages with 'kes '. +kes Allow dequeue_messages() to be called twice. Should fix bug + # 649. +kes Add Job type to bscan Job information output. 01Aug06 kes Update copyright date in program files, and for the most part put it on a #define. -- 2.39.5