rx.JobIds = (char *)"";
rx.bsr->JobId = jcr->previous_jr.JobId;
ua = new_ua_context(jcr);
- complete_bsr(ua, rx.bsr);
+ if (!complete_bsr(ua, rx.bsr)) {
+ goto bail_out;
+ }
rx.bsr->fi = new_findex();
rx.bsr->fi->findex = 1;
rx.bsr->fi->findex2 = jcr->previous_jr.JobFiles;
jcr->ExpectedFiles = write_bsr_file(ua, rx);
if (jcr->ExpectedFiles == 0) {
- free_ua_context(ua);
- free_bsr(rx.bsr);
- return false;
+ goto bail_out;
}
free_ua_context(ua);
free_bsr(rx.bsr);
jcr->needs_sd = true;
return true;
+
+bail_out:
+ free_ua_context(ua);
+ free_bsr(rx.bsr);
+ return false;
}
/* TODO: redirect command ouput to job log */
}
dir->fsend(OKbackup);
- Dmsg1(110, "bfiled>dird: %s", dir->msg);
+ Dmsg1(110, "filed>dird: %s", dir->msg);
/*
* Send Append Open Session to Storage daemon
generate_plugin_event(jcr, bEventLevel, (void *)jcr->get_JobLevel());
generate_plugin_event(jcr, bEventStartVerifyJob);
- Dmsg1(110, "bfiled>dird: %s", dir->msg);
+ Dmsg1(110, "filed>dird: %s", dir->msg);
switch (jcr->get_JobLevel()) {
case L_VERIFY_INIT:
* Send Close session command to Storage daemon
*/
sd->fsend(read_close, jcr->Ticket);
- Dmsg1(130, "bfiled>stored: %s", sd->msg);
+ Dmsg1(130, "filed>stored: %s", sd->msg);
/* ****FIXME**** check response */
bget_msg(sd); /* get OK */
jcr->prefix_links = prefix_links;
dir->fsend(OKrestore);
- Dmsg1(110, "bfiled>dird: %s", dir->msg);
+ Dmsg1(110, "filed>dird: %s", dir->msg);
jcr->set_JobType(JT_RESTORE);
* Send Close session command to Storage daemon
*/
sd->fsend(read_close, jcr->Ticket);
- Dmsg1(130, "bfiled>stored: %s", sd->msg);
+ Dmsg1(130, "filed>stored: %s", sd->msg);
bget_msg(sd); /* get OK */
* Get ticket number
*/
if (bget_msg(sd) >= 0) {
- Dmsg1(110, "bfiled<stored: %s", sd->msg);
+ Dmsg1(110, "filed<stored: %s", sd->msg);
if (sscanf(sd->msg, OK_open, &jcr->Ticket) != 1) {
Jmsg(jcr, M_FATAL, 0, _("Bad response to SD read open: %s\n"), sd->msg);
return 0;
}
- Dmsg1(110, "bfiled: got Ticket=%d\n", jcr->Ticket);
+ Dmsg1(110, "filed: got Ticket=%d\n", jcr->Ticket);
} else {
Jmsg(jcr, M_FATAL, 0, _("Bad response from stored to read open command\n"));
return 0;
free_pool_memory(win32_fname);
return bfd->mode == BF_CLOSED ? -1 : 1;
}
- Dmsg0(50, "=== NOT plugin\n");
+ Dmsg0(50, "=== NO plugin\n");
- if (!(p_CreateFileA || p_CreateFileW))
+ if (!(p_CreateFileA || p_CreateFileW)) {
+ Dmsg0(50, "No CreateFileA and no CreateFileW!!!!!\n");
return 0;
+ }
- if (p_CreateFileW && p_MultiByteToWideChar)
+ if (p_CreateFileW && p_MultiByteToWideChar) {
make_win32_path_UTF8_2_wchar(&win32_fname_wchar, fname);
+ }
if (flags & O_CREAT) { /* Create */
if (bfd->use_backup_api) {
if (p_CreateFileW && p_MultiByteToWideChar) {
// unicode open for create write
+ Dmsg1(100, "Create CreateFileW=%s\n", win32_fname);
bfd->fh = p_CreateFileW((LPCWSTR)win32_fname_wchar,
dwaccess, /* Requested access */
0, /* Shared mode */
NULL); /* TemplateFile */
} else {
// ascii open
+ Dmsg1(100, "Create CreateFileA=%s\n", win32_fname);
bfd->fh = p_CreateFileA(win32_fname,
dwaccess, /* Requested access */
0, /* Shared mode */
if (p_CreateFileW && p_MultiByteToWideChar) {
// unicode open for open existing write
+ Dmsg1(100, "Write only CreateFileW=%s\n", win32_fname);
bfd->fh = p_CreateFileW((LPCWSTR)win32_fname_wchar,
dwaccess, /* Requested access */
0, /* Shared mode */
NULL); /* TemplateFile */
} else {
// ascii open
+ Dmsg1(100, "Write only CreateFileA=%s\n", win32_fname);
bfd->fh = p_CreateFileA(win32_fname,
dwaccess, /* Requested access */
0, /* Shared mode */
if (p_CreateFileW && p_MultiByteToWideChar) {
// unicode open for open existing read
+ Dmsg1(100, "Read CreateFileW=%s\n", win32_fname);
bfd->fh = p_CreateFileW((LPCWSTR)win32_fname_wchar,
dwaccess, /* Requested access */
dwshare, /* Share modes */
NULL); /* TemplateFile */
} else {
// ascii open
+ Dmsg1(100, "Read CreateFileA=%s\n", win32_fname);
bfd->fh = p_CreateFileA(win32_fname,
dwaccess, /* Requested access */
dwshare, /* Share modes */
if (trace) {
if (!trace_fd) {
char fn[200];
- bsnprintf(fn, sizeof(fn), "%s/%s.trace", working_directory ? working_directory : ".", my_name);
+ bsnprintf(fn, sizeof(fn), "%s/%s.trace", working_directory ? working_directory : "./", my_name);
trace_fd = fopen(fn, "a+b");
}
if (trace_fd) {
-/*
- * Parse a Bootstrap Records (used for restores)
- *
- * Kern Sibbald, June MMII
- *
- * Version $Id$
- */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2002-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2002-2008 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.
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ * Parse a Bootstrap Records (used for restores)
+ *
+ * Kern Sibbald, June MMII
+ *
+ * Version $Id$
+ */
#include "bacula.h"
*/
#undef VERSION
-#define VERSION "2.5.24"
-#define BDATE "16 December 2008"
-#define LSMDATE "16Dec08"
+#define VERSION "2.5.25"
+#define BDATE "20 December 2008"
+#define LSMDATE "20Dec08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
mixed priorities
General:
+20Dec08
+kes Correct typo in Win32 Makefile editing
+kes Correct typos in debug output.
+kes Improved error detection in creating bsrs.
+kes Add debug code to Win32 restore
19Dec08
+kes Fix Win32 build.
ebl Cleanup director VolParam struct
18Dec08
ebl Replace File:Block in BSR by Address to fix #1190