]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.2.x/2.2.6-maxruntime.patch
ebl Add patch to allow a more easy selection for restore
[bacula/bacula] / bacula / patches / 2.2.x / 2.2.6-maxruntime.patch
1   This patch fixes bug #1012 where the job is canceled because
2   of Max Run Time exceeded when the job has not yet started.
3
4   Apply it to 2.2.6 or any prior 2.2.x version with:
5
6   cd <bacula-source>
7   patch -p0 <2.2.6-maxruntime.patch
8   ./configure <your-options>
9   make
10   ...
11   make install
12
13
14 Index: src/dird/job.c
15 ===================================================================
16 --- src/dird/job.c      (revision 5979)
17 +++ src/dird/job.c      (working copy)
18 @@ -556,7 +556,7 @@
19   */
20  static bool job_check_maxruntime(JCR *control_jcr, JCR *jcr)
21  {
22 -   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr)) {
23 +   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr) || jcr->JobStatus == JS_Created) {
24        return false;
25     }
26     if ((watchdog_time - jcr->start_time) < jcr->job->MaxRunTime) {
27 @@ -931,6 +931,7 @@
28  {
29     jcr->job = job;
30     jcr->JobType = job->JobType;
31 +   jcr->JobStatus = JS_Created;
32     switch (jcr->JobType) {
33     case JT_ADMIN:
34     case JT_RESTORE: