]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.4.2-cancel-non-running-jobs.patch
ebl Fix next_vol()
[bacula/bacula] / bacula / patches / 2.4.2-cancel-non-running-jobs.patch
1
2  This patch causes that jobs not yet created are now removed from
3  the work queue just after the cancel command.
4
5  It can be applied to 2.4.2 (not to previous versions) with:
6
7   cd <bacula-source>
8   patch -p0 <2.4.2-cancel-non-running-jobs.patch
9   ./configure <your-options>
10   make
11   ...
12   make install
13
14 Index: src/dird/job.c
15 ===================================================================
16 --- src/dird/job.c      (rĂ©vision 7681)
17 +++ src/dird/job.c      (copie de travail)
18 @@ -354,10 +354,11 @@
19  {
20     BSOCK *sd, *fd;
21     char ed1[50];
22 +   int32_t old_status = jcr->JobStatus;
23
24     set_jcr_job_status(jcr, JS_Canceled);
25
26 -   switch (jcr->JobStatus) {
27 +   switch (old_status) {
28     case JS_Created:
29     case JS_WaitJobRes:
30     case JS_WaitClientRes:
31