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.
/* Imported variables */
extern BSOCK *filed_chan;
-extern int r_first, r_last;
-extern struct s_res resources[];
extern struct s_last_job last_job;
extern bool init_done;
struct s_cmds {
const char *cmd;
bool (*func)(JCR *jcr);
- int monitoraccess; /* specify if monitors have access to this function */
+ bool monitoraccess; /* set if monitors can access this cmd */
};
/*
if (dcr) {
dev = dcr->dev;
dev->dlock(); /* Use P to avoid indefinite block */
- Dmsg1(100, "mount cmd blocked=%d\n", dev->blocked());
+ Dmsg2(100, "mount cmd blocked=%d must_unload=%d\n", dev->blocked(),
+ dev->must_unload());
switch (dev->blocked()) { /* device blocked? */
case BST_WAITING_FOR_SYSOP:
/* Someone is waiting, wake him */
*/
/* block_device(dev, BST_UNMOUNTED); replace with 2 lines below */
dev->set_blocked(BST_UNMOUNTED);
- dev->no_wait_id = 0;
+ clear_thread_id(dev->no_wait_id);
if (!unload_autochanger(dcr, -1)) {
dev->close();
}
send_dir_busy_message(dir, dev);
} else { /* device not being used */
Dmsg0(90, "Device not in use, releasing\n");
- unload_autochanger(dcr, -1);
dcr->release_volume();
dir->fsend(_("3022 Device %s released.\n"),
dev->print_name());
static bool bootstrap_cmd(JCR *jcr)
{
+ /* If getting the bootstrap file succeeds, we do not need
+ * the FD because we will be reading.
+ */
+ jcr->need_fd = false;
return get_bootstrap_file(jcr, jcr->dir_bsock);
}