]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl display messages after run_script
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 18 Mar 2007 20:55:12 +0000 (20:55 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 18 Mar 2007 20:55:12 +0000 (20:55 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4360 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/job.c

index 0df94071043f6719f5e6f250d5452a7b6be7d00f..91529724dfce479af220bfe34a94fa6181e7a21f 100644 (file)
@@ -222,7 +222,6 @@ void update_job_end(JCR *jcr, int TermCode)
 {
    dequeue_messages(jcr);             /* display any queued messages */
    set_jcr_job_status(jcr, TermCode);
-   run_scripts(jcr, jcr->job->RunScripts, "AfterJob");
    update_job_end_record(jcr);
 }
 
@@ -327,11 +326,13 @@ static void *job_thread(void *arg)
          Pmsg1(0, _("Unimplemented job type: %d\n"), jcr->JobType);
          break;
       }
+   }
 
-      /* Send off any queued messages */
-      if (jcr->msg_queue && jcr->msg_queue->size() > 0) {
-         dequeue_messages(jcr);
-      }
+   run_scripts(jcr, jcr->job->RunScripts, "AfterJob");
+
+   /* Send off any queued messages */
+   if (jcr->msg_queue && jcr->msg_queue->size() > 0) {
+      dequeue_messages(jcr);
    }
 
    generate_daemon_event(jcr, "JobEnd");