X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Ffd_cmds.c;h=78b96b7d25e9919cb7e1ccb9dce149c928c55853;hb=a64e57850ac943b84184f43e712ccf18b498ca30;hp=e4eaf9df49d51b9602847fabd8ed9ea899a49a39;hpb=84a05f3bfbde64c606b014d68b45b2d060e2a478;p=bacula%2Fbacula diff --git a/bacula/src/stored/fd_cmds.c b/bacula/src/stored/fd_cmds.c index e4eaf9df49..78b96b7d25 100644 --- a/bacula/src/stored/fd_cmds.c +++ b/bacula/src/stored/fd_cmds.c @@ -317,6 +317,7 @@ static int bootstrap_cmd(JCR *jcr) BSOCK *fd = jcr->file_bsock; POOLMEM *fname = get_pool_memory(PM_FNAME); FILE *bs; + int stat = 0; if (jcr->RestoreBootstrap) { unlink(jcr->RestoreBootstrap); @@ -345,15 +346,18 @@ static int bootstrap_cmd(JCR *jcr) if (debug_level > 20) { 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; + if (stat) { + return bnet_fsend(fd, OK_bootstrap); + } else { bnet_fsend(fd, ERROR_bootstrap); return 0; - + } }