]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/job.c
SetIP command + CloseOnPoll + Full,Inc,Diff Pools + more access control checks
[bacula/bacula] / bacula / src / dird / job.c
index 4e7e4d9a3b93aaa5e28250541b8201383fe3f11d..73eff3e13a7fd8a01ce9abe1ad36d1f211349cd1 100644 (file)
@@ -7,7 +7,7 @@
  *    Version $Id$
  */
 /*
-   Copyright (C) 2000-2003 Kern Sibbald and John Walker
+   Copyright (C) 2000-2004 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -478,16 +478,18 @@ static void *job_thread(void *arg)
                Jmsg(jcr, M_INFO, 0, _("RunAfter: %s"), line);
            }
            status = close_bpipe(bpipe);
+           /*
+            * Note, if we get an error here, do not mark the
+            *  job in error, simply report the error condition.   
+            */
            if (status != 0) {
               if (jcr->JobStatus == JS_Terminated) {
-                  Jmsg(jcr, M_FATAL, 0, _("RunAfterJob returned non-zero status=%d\n"),
+                  Jmsg(jcr, M_ERROR, 0, _("RunAfterJob returned non-zero status=%d\n"),
                       status);
               } else {
                   Jmsg(jcr, M_FATAL, 0, _("RunAfterFailedJob returned non-zero status=%d\n"),
                       status);
               }
-              set_jcr_job_status(jcr, JS_FatalError);
-              update_job_end_record(jcr);
            }
         }
       }
@@ -678,6 +680,9 @@ void set_jcr_defaults(JCR *jcr, JOB *job)
    }
    pm_strcpy(&jcr->client_name, jcr->client->hdr.name);
    jcr->pool = job->pool;
+   jcr->full_pool = job->full_pool;
+   jcr->inc_pool = job->inc_pool;
+   jcr->dif_pool = job->dif_pool;
    jcr->catalog = job->client->catalog;
    jcr->fileset = job->fileset;
    jcr->messages = job->messages;