X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fdircmd.c;h=ad294bb0627c2d6ba4ed45e8eedb78eaf83a767f;hb=ce462cd94d90f4785b622cedc2ca48d616fe3f07;hp=9387a4ac29b5518acc55849d16dec11f6817327f;hpb=a698b6e3cd8527d96541276cd912496b5ca0e175;p=bacula%2Fbacula diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 9387a4ac29..ad294bb062 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -54,8 +54,6 @@ /* 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; @@ -97,7 +95,7 @@ static void send_dir_busy_message(BSOCK *dir, DEVICE *dev); 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 */ }; /* @@ -652,7 +650,8 @@ static bool mount_cmd(JCR *jcr) 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 */ @@ -917,7 +916,6 @@ static bool release_cmd(JCR *jcr) 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());