]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/backup.c
Ensure that StorageId is updated after write
[bacula/bacula] / bacula / src / dird / backup.c
index 4ac0b8af5f760038eec5c2a36d7221a98bbcd659..77a3845e2d9a87b83f7e9c93bbbbb06589faf8ff 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2011 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2012 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.
@@ -240,7 +240,6 @@ bool send_accurate_current_files(JCR *jcr)
    POOL_MEM buf;
    db_list_ctx jobids;
    db_list_ctx nb;
-   char ed1[50];
 
    /* In base level, no previous job is used and no restart incomplete jobs */
    if (jcr->is_canceled() || jcr->is_JobLevel(L_BASE)) {
@@ -385,15 +384,15 @@ bool do_backup(JCR *jcr)
    jcr->setJobStatus(JS_Running);
    fd = jcr->file_bsock;
 
-   if (!send_include_list(jcr)) {
+   if (!send_level_command(jcr)) {
       goto bail_out;
    }
 
-   if (!send_exclude_list(jcr)) {
+   if (!send_include_list(jcr)) {
       goto bail_out;
    }
 
-   if (!send_level_command(jcr)) {
+   if (!send_exclude_list(jcr)) {
       goto bail_out;
    }
 
@@ -605,10 +604,14 @@ void backup_cleanup(JCR *jcr, int TermCode)
    }
 
    Dmsg2(100, "Enter backup_cleanup %d %c\n", TermCode, TermCode);
-   memset(&mr, 0, sizeof(mr));
    memset(&cr, 0, sizeof(cr));
 
 #ifdef xxxx
+   /* The current implementation of the JS_Warning status is not
+    * completed. SQL part looks to be ok, but the code is using
+    * JS_Terminated almost everywhere instead of (JS_Terminated || JS_Warning)
+    * as we do with is_canceled()
+    */
    if (jcr->getJobStatus() == JS_Terminated && 
         (jcr->JobErrors || jcr->SDErrors || jcr->JobWarnings)) {
       TermCode = JS_Warnings;