set_jcr_job_status(jcr, JS_Terminated);
bnet_fsend(dir, Job_end, jcr->Job, jcr->JobStatus, jcr->JobFiles,
edit_uint64(jcr->JobBytes, ec1));
-
bnet_sig(dir, BNET_EOD); /* send EOD to Director daemon */
return;
}
Dmsg1(120, "Append data: %s", fd->msg);
if (jcr->session_opened) {
Dmsg1(110, "<bfiled: %s", fd->msg);
+ jcr->JobType = JT_BACKUP;
if (do_append_data(jcr)) {
bnet_fsend(fd, OK_append);
- jcr->JobType = JT_BACKUP;
return 1;
} else {
bnet_suppress_error_messages(fd, 1); /* ignore errors at this point */
bnet_fsend(fd, NOT_opened);
return 0;
}
+ set_jcr_job_status(jcr, JS_Terminated);
return bnet_fsend(fd, OK_end);
}
}
/* Send final statistics to File daemon */
bnet_fsend(fd, OK_close, jcr->JobStatus);
- Dmsg1(160, ">filed: %s\n", fd->msg);
+ Dmsg1(120, ">filed: %s\n", fd->msg);
bnet_sig(fd, BNET_EOD); /* send EOD to File daemon */
BSOCK *fd = jcr->file_bsock;
POOLMEM *fname = get_pool_memory(PM_FNAME);
FILE *bs;
+ int stat = 0;
if (jcr->RestoreBootstrap) {
unlink(jcr->RestoreBootstrap);
goto bail_out;
}
if (debug_level > 20) {
- dump_bsr(jcr->bsr);
+ dump_bsr(jcr->bsr, true);
}
- return bnet_fsend(fd, OK_bootstrap);
+ stat = 1;
bail_out:
unlink(jcr->RestoreBootstrap);
free_pool_memory(jcr->RestoreBootstrap);
jcr->RestoreBootstrap = NULL;
- bnet_fsend(fd, ERROR_bootstrap);
- return 0;
-
+ if (stat) {
+ return bnet_fsend(fd, OK_bootstrap);
+ } else {
+ bnet_fsend(fd, ERROR_bootstrap);
+ return 0;
+ }
}