From 0a7afb6f0bb6c1c1833b7d4b68e1170d81c4c5cc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 6 Feb 2007 13:58:26 +0000 Subject: [PATCH] kes Delete src/lib/btree.c from win32 build, then add rblist.c plus the entrypoints. kes Apply patch supplied that corrects debug print in canceling jobs for max run time. Supplied as part of bug #621, which was previously fixed. 05Feb07 kes Test on job_canceled() and sd_msg_thread_done inside loop starting the message thread to avoid a race condition. Fixes bug #771. kes Remove rl_catch_signal from console.c as it conflicted with the header definition. Fixes bug #765. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4110 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/AUTHORS | 3 +-- bacula/INSTALL | 4 ++++ bacula/src/console/console.c | 2 +- bacula/src/dird/job.c | 4 ++-- bacula/src/dird/msgchan.c | 7 +++++-- bacula/src/dird/protos.h | 2 +- bacula/technotes-2.1 | 11 +++++++++++ 7 files changed, 25 insertions(+), 8 deletions(-) diff --git a/bacula/AUTHORS b/bacula/AUTHORS index cd6b70c665..16372396f8 100644 --- a/bacula/AUTHORS +++ b/bacula/AUTHORS @@ -6,8 +6,6 @@ participation, Bacula would not be the success it is today. If you have made a contribution and do not find your name on this list, please send a note to me: kern@sibbald.com -(Note, under construction prior to version 1.40 release) - Contributors: Adam Thorton @@ -40,6 +38,7 @@ Jaime Ventura Jan Kesten John Goerzen John Kodis +John Walker Jose Luis Tallon Jo Simoens Juan Luis Frances diff --git a/bacula/INSTALL b/bacula/INSTALL index 41f8213921..1ddba3cfb9 100644 --- a/bacula/INSTALL +++ b/bacula/INSTALL @@ -1,3 +1,7 @@ + +This file is rather out of date, though it contains generally useful +information. We recommend following step 1 below (i.e. see the manual). + -------------------------------------------------------------------------- Using GNU autoconfig -------------------------------------------------------------------------- diff --git a/bacula/src/console/console.c b/bacula/src/console/console.c index 8219aa5c2d..07e760cef2 100644 --- a/bacula/src/console/console.c +++ b/bacula/src/console/console.c @@ -57,7 +57,7 @@ /* Exported variables */ -extern int rl_catch_signals; +//extern int rl_catch_signals; /* Imported functions */ int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons); diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 83d06fcaed..73658d9785 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -554,7 +554,7 @@ static bool job_check_maxwaittime(JCR *control_jcr, JCR *jcr) jcr->JobStatus); } Dmsg3(800, "MaxWaitTime result: %scancel JCR %p (%s)\n", - cancel ? "" : "do not ", jcr, jcr->job); + cancel ? "" : "do not ", jcr, jcr->Job); #endif return cancel; } @@ -602,7 +602,7 @@ static bool job_check_maxruntime(JCR *control_jcr, JCR *jcr) } Dmsg3(200, "MaxRunTime result: %scancel JCR %p (%s)\n", - cancel ? "" : "do not ", jcr, jcr->job); + cancel ? "" : "do not ", jcr, jcr->Job); #endif return true; } diff --git a/bacula/src/dird/msgchan.c b/bacula/src/dird/msgchan.c index 84a25f4537..31d47dab9f 100644 --- a/bacula/src/dird/msgchan.c +++ b/bacula/src/dird/msgchan.c @@ -302,7 +302,7 @@ bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore) * Start a thread to handle Storage daemon messages and * Catalog requests. */ -int start_storage_daemon_message_thread(JCR *jcr) +bool start_storage_daemon_message_thread(JCR *jcr) { int status; pthread_t thid; @@ -318,9 +318,12 @@ int start_storage_daemon_message_thread(JCR *jcr) /* Wait for thread to start */ while (jcr->SD_msg_chan == 0) { bmicrosleep(0, 50); + if (job_canceled(jcr) || jcr->sd_msg_thread_done) { + return false; + } } Dmsg1(100, "SD msg_thread started. use=%d\n", jcr->use_count()); - return 1; + return true; } extern "C" void msg_thread_cleanup(void *arg) diff --git a/bacula/src/dird/protos.h b/bacula/src/dird/protos.h index 31761cd19f..fbd93b73f5 100644 --- a/bacula/src/dird/protos.h +++ b/bacula/src/dird/protos.h @@ -141,7 +141,7 @@ extern void mount_request(JCR *jcr, BSOCK *bs, char *buf); extern bool connect_to_storage_daemon(JCR *jcr, int retry_interval, int max_retry_time, int verbose); extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore); -extern int start_storage_daemon_message_thread(JCR *jcr); +extern bool start_storage_daemon_message_thread(JCR *jcr); extern int bget_dirmsg(BSOCK *bs); extern void wait_for_storage_daemon_termination(JCR *jcr); diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 41dde5bd36..6abd219894 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,7 +1,18 @@ Technical notes on version 2.1 General: +06Feb07 +kes Delete src/lib/btree.c from win32 build, then add rblist.c + plus the entrypoints. +kes Apply patch supplied that corrects debug print + in canceling jobs for max run time. Supplied as + part of bug #621, which was previously fixed. 05Feb07 +kes Test on job_canceled() and sd_msg_thread_done inside + loop starting the message thread to avoid a race condition. + Fixes bug #771. +kes Remove rl_catch_signal from console.c as it conflicted + with the header definition. Fixes bug #765. ebl Fixes bug #766 about RunsOnClient = Yes 04Feb07 kes Clarify some stored/acquire messages to indicate if the -- 2.39.5