From 521a59ef61769035775001c1eca8587880f99ecb Mon Sep 17 00:00:00 2001 From: Thorsten Engel Date: Fri, 21 Apr 2006 16:04:16 +0000 Subject: [PATCH] bugfix: an early cancel (e.g. during request for label) causes a "goto cleanup" which leads to a runtime error when the vss_mutex was released, but never locked. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2954 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/job.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index ac389dc45d..6c21857029 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1190,6 +1190,12 @@ static int backup_cmd(JCR *jcr) int SDJobStatus; char ed1[50], ed2[50]; +#ifdef WIN32_VSS + if (g_pVSSClient && enable_vss) + /* Run only one at a time */ + P(vss_mutex); +#endif + set_jcr_job_status(jcr, JS_Blocked); jcr->JobType = JT_BACKUP; Dmsg1(100, "begin backup ff=%p\n", jcr->ff); @@ -1240,9 +1246,7 @@ static int backup_cmd(JCR *jcr) #ifdef WIN32_VSS /* START VSS ON WIN 32 */ - if (g_pVSSClient && enable_vss) { - /* Run only one at a time */ - P(vss_mutex); + if (g_pVSSClient && enable_vss) { if (g_pVSSClient->InitializeForBackup()) { /* tell vss which drives to snapshot */ char szWinDriveLetters[27]; -- 2.39.5