]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/restore.c
update configure
[bacula/bacula] / bacula / src / dird / restore.c
index a5cce8511d6a32468384f414d9dbc34de0cea8b6..a04e1ac3bdef119c05c01f741092b1c5d546159d 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2010 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.
@@ -136,7 +136,7 @@ static bool open_bootstrap_file(JCR *jcr, bootstrap_info &info)
       berrno be;
       Jmsg(jcr, M_FATAL, 0, _("Could not open bootstrap file %s: ERR=%s\n"),
          jcr->RestoreBootstrap, be.bstrerror());
-      set_jcr_job_status(jcr, JS_ErrorTerminated);
+      jcr->setJobStatus(JS_ErrorTerminated);
       return false;
    }
 
@@ -171,7 +171,7 @@ static bool is_on_same_storage(JCR *jcr, char *new_one)
    if (jcr->FDVersion < 2) {
       return true;
    }
-   /* we are in init loop ? shoudn't fall here */
+   /* we are in init loop ? shoudn't fail here */
    if (!*new_one) {
       return true;
    }
@@ -181,9 +181,8 @@ static bool is_on_same_storage(JCR *jcr, char *new_one)
    }
    new_store = (STORE *)GetResWithName(R_STORAGE, new_one);
    if (!new_store) {
-      Jmsg(jcr, M_FATAL, 0,
+      Jmsg(jcr, M_WARNING, 0,
            _("Could not get storage resource '%s'.\n"), new_one);
-      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return false;
    }
    /* if Port and Hostname/IP are same, we are talking to the same
@@ -275,7 +274,7 @@ static bool select_rstore(JCR *jcr, bootstrap_info &info)
    if (!(ustore.store = (STORE *)GetResWithName(R_STORAGE,info.storage))) {
       Jmsg(jcr, M_FATAL, 0,
            _("Could not get storage resource '%s'.\n"), info.storage);
-      set_jcr_job_status(jcr, JS_ErrorTerminated);
+      jcr->setJobStatus(JS_ErrorTerminated);
       return false;
    }
    
@@ -293,14 +292,14 @@ static bool select_rstore(JCR *jcr, bootstrap_info &info)
    dec_read_store(jcr);
    free_rstorage(jcr);
    set_rstorage(jcr, &ustore);
-   set_jcr_job_status(jcr, JS_WaitSD);
+   jcr->setJobStatus(JS_WaitSD);
    /*
     * Wait for up to 6 hours to increment read stoage counter 
     */
    for (i=0; i < MAX_TRIES; i++) {
       /* try to get read storage counter incremented */
       if (inc_read_store(jcr)) {
-         set_jcr_job_status(jcr, JS_Running);
+         jcr->setJobStatus(JS_Running);
          return true;
       }
       bmicrosleep(10, 0);       /* sleep 10 secs */
@@ -368,7 +367,7 @@ bool restore_bootstrap(JCR *jcr)
        *
        */
       Dmsg0(10, "Open connection with storage daemon\n");
-      set_jcr_job_status(jcr, JS_WaitSD);
+      jcr->setJobStatus(JS_WaitSD);
       /*
        * Start conversation with Storage daemon
        */
@@ -387,7 +386,7 @@ bool restore_bootstrap(JCR *jcr)
          /*
           * Start conversation with File daemon
           */
-         set_jcr_job_status(jcr, JS_WaitFD);
+         jcr->setJobStatus(JS_WaitFD);
          jcr->keep_sd_auth_key = true; /* don't clear the sd_auth_key now */
          if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) {
             goto bail_out;
@@ -395,7 +394,7 @@ bool restore_bootstrap(JCR *jcr)
          fd = jcr->file_bsock;
       }
 
-      set_jcr_job_status(jcr, JS_WaitSD);
+      jcr->setJobStatus(JS_WaitSD);
 
       /*
        * Send the bootstrap file -- what Volumes/files to restore