From: Kern Sibbald Date: Sun, 14 Jun 2009 08:30:17 +0000 (+0000) Subject: Add 3.0.x patches dir X-Git-Tag: Release-3.0.2~165 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a23ad6bce5ffd0c7e952e7992f601a1225bf30f;p=bacula%2Fbacula Add 3.0.x patches dir git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8901 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/3.0.1-cancel-sd.patch b/bacula/patches/3.0.1-cancel-sd.patch new file mode 100644 index 0000000000..e93e1b783b --- /dev/null +++ b/bacula/patches/3.0.1-cancel-sd.patch @@ -0,0 +1,116 @@ + + This patch can be applied to version 3.0.1 and should fix + a crash in the SD that occurs after canceling a job. + This should fix bug #1298. + + Apply it to version 3.0.1 with: + + cd + patch -p0 <3.0.1-cancel-sd.patch + ./configure + make + ... + make install + + + +Index: src/stored/reserve.c +=================================================================== +--- src/stored/reserve.c (revision 8892) ++++ src/stored/reserve.c (working copy) +@@ -755,6 +755,9 @@ + bool ok = false; + + ASSERT(dcr); ++ if (job_canceled(jcr)) { ++ return false; ++ } + + dev->dlock(); + +@@ -809,6 +812,9 @@ + bool ok = false; + + ASSERT(dcr); ++ if (job_canceled(jcr)) { ++ return false; ++ } + + dev->dlock(); + +Index: src/stored/spool.c +=================================================================== +--- src/stored/spool.c (revision 8892) ++++ src/stored/spool.c (working copy) +@@ -436,6 +436,9 @@ + bool despool = false; + DEV_BLOCK *block = dcr->block; + ++ if (job_canceled(dcr->jcr)) { ++ return false; ++ } + ASSERT(block->binbuf == ((uint32_t) (block->bufp - block->buf))); + if (block->binbuf <= WRITE_BLKHDR_LENGTH) { /* Does block have data in it? */ + return true; +Index: src/stored/vol_mgr.c +=================================================================== +--- src/stored/vol_mgr.c (revision 8892) ++++ src/stored/vol_mgr.c (working copy) +@@ -344,6 +344,9 @@ + VOLRES *vol, *nvol; + DEVICE * volatile dev = dcr->dev; + ++ if (job_canceled(dcr->jcr)) { ++ return NULL; ++ } + ASSERT(dev != NULL); + + Dmsg2(dbglvl, "enter reserve_volume=%s drive=%s\n", VolumeName, +@@ -701,6 +704,9 @@ + bool rtn = true; + VOLRES *vol; + ++ if (job_canceled(jcr)) { ++ return false; ++ } + lock_volumes(); + vol = find_volume(VolumeName); + if (!vol) { +Index: src/stored/askdir.c +=================================================================== +--- src/stored/askdir.c (revision 8892) ++++ src/stored/askdir.c (working copy) +@@ -494,6 +494,9 @@ + JCR *jcr = dcr->jcr; + bool got_vol = false; + ++ if (job_canceled(jcr)) { ++ return false; ++ } + Dmsg0(400, "enter dir_ask_sysop_to_create_appendable_volume\n"); + ASSERT(dev->blocked()); + for ( ;; ) { +Index: src/stored/block.c +=================================================================== +--- src/stored/block.c (revision 8892) ++++ src/stored/block.c (working copy) +@@ -415,6 +415,9 @@ + empty_block(block); + return true; + #endif ++ if (job_canceled(jcr)) { ++ return false; ++ } + ASSERT(block->binbuf == ((uint32_t) (block->bufp - block->buf))); + ASSERT(dev->is_open()); + +@@ -935,6 +938,9 @@ + DEVICE *dev = dcr->dev; + DEV_BLOCK *block = dcr->block; + ++ if (job_canceled(jcr)) { ++ return false; ++ } + ASSERT(dev->is_open()); + + if (dev->at_eot()) {