     default:
 +      if (set_waittime) {
 +	 /* set it before JobStatus */
++	 Dmsg0(800, "Setting wait_time\n");
 +	 jcr->wait_time = time(NULL);
 +      }
        jcr->JobStatus = JobStatus;

Index: src/dird/job.c
===================================================================
--- src/dird/job.c	(rvision 4696)
+++ src/dird/job.c	(copie de travail)
@@ -487,21 +487,24 @@
    if (job_canceled(jcr)) {
       return false;                /* already canceled */
    }
+   if (!job_waiting(jcr)) {
+      return false;
+   }
    if (job->MaxWaitTime == 0 && job->FullMaxWaitTime == 0 &&
        job->IncMaxWaitTime == 0 && job->DiffMaxWaitTime == 0) {
       return false;
    } 
    if (jcr->JobLevel == L_FULL && job->FullMaxWaitTime != 0 &&
-         (watchdog_time - jcr->start_time) >= job->FullMaxWaitTime) {
+         (watchdog_time - jcr->wait_time) >= job->FullMaxWaitTime) {

       cancel = true;
    }
 
Index: src/dird/dird_conf.c
===================================================================
--- src/dird/dird_conf.c	(rvision 4696)
+++ src/dird/dird_conf.c	(copie de travail)
@@ -627,6 +627,15 @@
       if (res->res_job.WriteBootstrap) {
          sendit(sock, _("  --> WriteBootstrap=%s\n"), NPRT(res->res_job.WriteBootstrap));
       }
+      if (res->res_job.MaxRunTime) {
+         sendit(sock, _("  --> MaxRunTime=%u\n"), res->res_job.MaxRunTime);
+      }
+      if (res->res_job.MaxWaitTime) {
+         sendit(sock, _("  --> MaxWaitTime=%u\n"), res->res_job.MaxWaitTime);
+      }
+      if (res->res_job.MaxStartDelay) {
+         sendit(sock, _("  --> MaxStartDelay=%u\n"), res->res_job.MaxStartDelay);
+      }
       if (res->res_job.storage) {
          STORE *store;
          foreach_alist(store, res->res_job.storage) {
Index: src/jcr.h
===================================================================
--- src/jcr.h	(rvision 4696)
+++ src/jcr.h	(copie de travail)
@@ -105,6 +105,22 @@
    jcr->JobStatus == JS_ErrorTerminated || \
    jcr->JobStatus == JS_FatalError)
 
