-/*
- * 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"
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 {
}
jcr->session_opened = true;
- jcr->JobType = JT_RESTORE;
+ jcr->set_JobType(JT_RESTORE);
/* Send "Ticket" to File Daemon */
fd->fsend(OK_open, jcr->VolSessionId);
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");