From 0e4dd963ce6b1f2b1e7fe2d54910f836cb43ea57 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 5 Nov 2007 18:26:20 +0000 Subject: [PATCH] ebl revert previous change to get a more simple patch for #891 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5856 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/job.c | 30 ++++++------------------------ bacula/src/jcr.h | 1 - 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 125f2de9d4..03c971d8e8 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1321,25 +1321,6 @@ static int storage_cmd(JCR *jcr) return dir->fsend(OKstore); } -static void job_end(JCR *jcr) -{ - char ed1[50], ed2[50]; - - /* Inform Storage daemon that we are done */ - if (jcr->store_bsock) { - bnet_sig(jcr->store_bsock, BNET_TERMINATE); - } - - /* Run the after job */ - run_scripts(jcr, jcr->RunScripts, "ClientAfterJob"); - - bnet_fsend(jcr->dir_bsock, EndJob, jcr->JobStatus, jcr->JobFiles, - edit_uint64(jcr->ReadBytes, ed1), - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)jcr->VSS, - jcr->pki_encrypt); - Dmsg1(110, "End FD msg: %s\n", jcr->dir_bsock->msg); -} - /* * Do a backup. @@ -1351,13 +1332,14 @@ static int backup_cmd(JCR *jcr) 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. - jcr->VSS = g_pVSSClient && enable_vss; - if (jcr->VSS) { + bDoVSS = g_pVSSClient && enable_vss; + if (bDoVSS) { /* Run only one at a time */ P(vss_mutex); } @@ -1413,7 +1395,7 @@ static int backup_cmd(JCR *jcr) #if defined(WIN32_VSS) /* START VSS ON WIN 32 */ - if (jcr->VSS) { + if (bDoVSS) { if (g_pVSSClient->InitializeForBackup()) { /* tell vss which drives to snapshot */ char szWinDriveLetters[27]; @@ -1506,7 +1488,7 @@ cleanup: #if defined(WIN32_VSS) /* STOP VSS ON WIN 32 */ /* tell vss to close the backup session */ - if (jcr->VSS) { + if (bDoVSS) { if (g_pVSSClient->CloseBackup()) { /* inform user about writer states */ for (int i=0; i<(int)g_pVSSClient->GetWriterCount(); i++) { @@ -1524,7 +1506,7 @@ cleanup: bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles, edit_uint64(jcr->ReadBytes, ed1), - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)jcr->VSS, + edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)bDoVSS, jcr->pki_encrypt); Dmsg1(110, "End FD msg: %s\n", dir->msg); diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index bea8f1fad5..8812594861 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -301,7 +301,6 @@ public: int32_t pki_session_encoded_size; /* Size of DER-encoded pki_session */ POOLMEM *crypto_buf; /* Encryption/Decryption buffer */ DIRRES* director; /* Director resource */ - bool VSS; /* VSS used by FD */ #endif /* FILE_DAEMON */ -- 2.39.5