]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/fd_cmds.c
Make cd accept wildcards
[bacula/bacula] / bacula / src / stored / fd_cmds.c
index 110a6bf6594035ff1c3e9cc0d586d95e1a3c7460..a97f832a7ad69ab031fb6ee0a73f366695962cb1 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2011 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -118,16 +118,17 @@ void run_job(JCR *jcr)
    dir->fsend(Job_start, jcr->Job);
    jcr->start_time = time(NULL);
    jcr->run_time = jcr->start_time;
-   set_jcr_job_status(jcr, JS_Running);
-   dir_send_job_status(jcr);          /* update director */
+   jcr->sendJobStatus(JS_Running);
    do_fd_commands(jcr);
    jcr->end_time = time(NULL);
    dequeue_messages(jcr);             /* send any queued messages */
-   set_jcr_job_status(jcr, JS_Terminated);
+   jcr->setJobStatus(JS_Terminated);
    generate_daemon_event(jcr, "JobEnd");
+   generate_plugin_event(jcr, bsdEventJobEnd);
    dir->fsend(Job_end, jcr->Job, jcr->JobStatus, jcr->JobFiles,
       edit_uint64(jcr->JobBytes, ec1), jcr->JobErrors);
    dir->signal(BNET_EOD);             /* send EOD to Director daemon */
+   free_plugins(jcr);                 /* release instantiated plugins */
    return;
 }
 
@@ -167,7 +168,7 @@ void do_fd_commands(JCR *jcr)
                   } else {
                      Jmsg0(jcr, M_FATAL, 0, _("Command error with FD, hanging up.\n"));
                   }
-                  set_jcr_job_status(jcr, JS_ErrorTerminated);
+                  jcr->setJobStatus(JS_ErrorTerminated);
                }
                quit = true;
             }
@@ -198,7 +199,7 @@ static bool append_data_cmd(JCR *jcr)
    Dmsg1(120, "Append data: %s", fd->msg);
    if (jcr->session_opened) {
       Dmsg1(110, "<bfiled: %s", fd->msg);
-      jcr->set_JobType(JT_BACKUP);
+      jcr->setJobType(JT_BACKUP);
       if (do_append_data(jcr)) {
          return true;
       } else {
@@ -331,7 +332,7 @@ static bool read_open_session(JCR *jcr)
    }
 
    jcr->session_opened = true;
-   jcr->set_JobType(JT_RESTORE);
+   jcr->setJobType(JT_RESTORE);
 
    /* Send "Ticket" to File Daemon */
    fd->fsend(OK_open, jcr->VolSessionId);