]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/fd_cmds.c
Apply Joao's patch to SQLite tables to make chars work.
[bacula/bacula] / bacula / src / stored / fd_cmds.c
index 1c16b0f24c5d9fba57dde4b0e37ff075684aa0d3..7cd070e6c505664aea92ad6375d57b2f460759e1 100644 (file)
@@ -1,17 +1,3 @@
-/*
- * This file handles commands from the File daemon.
- *
- *  Kern Sibbald, MM
- *
- * We get here because the Director has initiated a Job with
- *  the Storage daemon, then done the same with the File daemon,
- *  then when the Storage daemon receives a proper connection from
- *  the File daemon, control is passed here to handle the
- *  subsequent File daemon commands.
- *
- *   Version $Id$
- *
- */
 /*
    Bacula® - The Network Backup Solution
 
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ * This file handles commands from the File daemon.
+ *
+ *  Kern Sibbald, MM
+ *
+ * We get here because the Director has initiated a Job with
+ *  the Storage daemon, then done the same with the File daemon,
+ *  then when the Storage daemon receives a proper connection from
+ *  the File daemon, control is passed here to handle the
+ *  subsequent File daemon commands.
+ *
+ *   Version $Id$
+ *
+ */
 
 #include "bacula.h"
 #include "stored.h"
@@ -190,7 +190,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->JobType = JT_BACKUP;
+      jcr->set_JobType(JT_BACKUP);
       if (do_append_data(jcr)) {
          return true;
       } else {
@@ -316,7 +316,7 @@ static bool read_open_session(JCR *jcr)
    }
 
    jcr->session_opened = true;
-   jcr->JobType = JT_RESTORE;
+   jcr->set_JobType(JT_RESTORE);
 
    /* Send "Ticket" to File Daemon */
    fd->fsend(OK_open, jcr->VolSessionId);
@@ -352,8 +352,9 @@ bool get_bootstrap_file(JCR *jcr, BSOCK *sock)
    jcr->RestoreBootstrap = fname;
    bs = fopen(fname, "a+b");           /* create file */
    if (!bs) {
+      berrno be;
       Jmsg(jcr, M_FATAL, 0, _("Could not create bootstrap file %s: ERR=%s\n"),
-         jcr->RestoreBootstrap, strerror(errno));
+         jcr->RestoreBootstrap, be.bstrerror());
       goto bail_out;
    }
    Dmsg0(10, "=== Bootstrap file ===\n");