From 08e1432ca5e0f177d58c088a77d4a89c1f1cdd1d Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 19 Dec 2007 20:09:17 +0000 Subject: [PATCH] ebl Always use ignorecase fileset option on win32 FD. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6078 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/job.c | 51 ++++++++++++++++-------------------------- bacula/technotes-2.3 | 2 ++ 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 03c971d8e8..4a75269585 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -261,6 +261,16 @@ void *handle_client_request(void *dirp) } } + if (jcr->JobId) { /* send EndJob if running a job */ + char ed1[50], ed2[50]; + /* Send termination status back to Dir */ + bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles, + edit_uint64(jcr->ReadBytes, ed1), + edit_uint64(jcr->JobBytes, ed2), jcr->Errors, jcr->VSS, + jcr->pki_encrypt); + Dmsg1(110, "End FD msg: %s\n", dir->msg); + } + /* Inform Storage daemon that we are done */ if (jcr->store_bsock) { bnet_sig(jcr->store_bsock, BNET_TERMINATE); @@ -936,6 +946,10 @@ static void set_options(findFOPTS *fo, const char *opts) const char *p; char strip[100]; +#ifdef HAVE_WIN32 + fo->flags |= FO_IGNORECASE; /* always ignorecase under windows */ +#endif + for (p=opts; *p; p++) { switch (*p) { case 'a': /* alway replace */ @@ -1331,15 +1345,13 @@ static int backup_cmd(JCR *jcr) BSOCK *sd = jcr->store_bsock; int ok = 0; int SDJobStatus; - char ed1[50], ed2[50]; - bool bDoVSS = false; #if defined(WIN32_VSS) // capture state here, if client is backed up by multiple directors // and one enables vss and the other does not then enable_vss can change // between here and where its evaluated after the job completes. - bDoVSS = g_pVSSClient && enable_vss; - if (bDoVSS) { + jcr->VSS = g_pVSSClient && enable_vss; + if (jcr->VSS) { /* Run only one at a time */ P(vss_mutex); } @@ -1395,7 +1407,7 @@ static int backup_cmd(JCR *jcr) #if defined(WIN32_VSS) /* START VSS ON WIN 32 */ - if (bDoVSS) { + if (jcr->VSS) { if (g_pVSSClient->InitializeForBackup()) { /* tell vss which drives to snapshot */ char szWinDriveLetters[27]; @@ -1488,7 +1500,7 @@ cleanup: #if defined(WIN32_VSS) /* STOP VSS ON WIN 32 */ /* tell vss to close the backup session */ - if (bDoVSS) { + if (jcr->VSS) { if (g_pVSSClient->CloseBackup()) { /* inform user about writer states */ for (int i=0; i<(int)g_pVSSClient->GetWriterCount(); i++) { @@ -1504,12 +1516,6 @@ cleanup: } #endif - bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles, - edit_uint64(jcr->ReadBytes, ed1), - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)bDoVSS, - jcr->pki_encrypt); - Dmsg1(110, "End FD msg: %s\n", dir->msg); - return 0; /* return and stop command loop */ } @@ -1521,7 +1527,7 @@ static int verify_cmd(JCR *jcr) { BSOCK *dir = jcr->dir_bsock; BSOCK *sd = jcr->store_bsock; - char level[100], ed1[50], ed2[50]; + char level[100]; jcr->JobType = JT_VERIFY; if (sscanf(dir->msg, verifycmd, level) != 1) { @@ -1585,15 +1591,6 @@ static int verify_cmd(JCR *jcr) bnet_sig(dir, BNET_EOD); - /* Send termination status back to Dir */ - bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles, - edit_uint64(jcr->ReadBytes, ed1), - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0, - jcr->pki_encrypt); - Dmsg1(110, "End FD msg: %s\n", dir->msg); - - /* Inform Director that we are done */ - bnet_sig(dir, BNET_TERMINATE); return 0; /* return and terminate command loop */ } @@ -1609,7 +1606,6 @@ static int restore_cmd(JCR *jcr) bool use_regexwhere=false; int prefix_links; char replace; - char ed1[50], ed2[50]; /* * Scan WHERE (base directory for restore) from command @@ -1696,15 +1692,6 @@ bail_out: if (jcr->Errors) { set_jcr_job_status(jcr, JS_ErrorTerminated); } - /* Send termination status back to Dir */ - bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles, - edit_uint64(jcr->ReadBytes, ed1), - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0, - jcr->pki_encrypt); - Dmsg1(110, "End FD msg: %s\n", dir->msg); - - /* Inform Director that we are done */ - bnet_sig(dir, BNET_TERMINATE); Dmsg0(130, "Done in job.c\n"); return 0; /* return and terminate command loop */ diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 65c1f273e1..5a8e94d0e4 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -1,6 +1,8 @@ Technical notes on version 2.3 General: +19Dec07 +ebl Always use ignorecase fileset option on win32 FD. 14Dec07 kes Apply patch from Michael Stapelberg that implements double quoting include names in conf files, -- 2.39.5