]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dircmd.c
Did not intend to leave those debugging lines there.
[bacula/bacula] / bacula / src / stored / dircmd.c
index 972c66fc8a4d841383c50e8e2610f1fd3382d21e..47370524a1296ab52f3e7e06913d45cba8df1c5d 100644 (file)
@@ -20,7 +20,7 @@
    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.
@@ -175,6 +175,7 @@ void *handle_connection_request(void *arg)
    if (sscanf(bs->msg, "Hello Start Job %127s", name) == 1) {
       Dmsg1(110, "Got a FD connection at %s\n", bstrftimes(tbuf, sizeof(tbuf), 
             (utime_t)time(NULL)));
+      Dmsg1(50, "%s", bs->msg);
       handle_filed_connection(bs, name);
       return NULL;
    }
@@ -650,7 +651,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 */
@@ -837,7 +839,7 @@ static bool unmount_cmd(JCR *jcr)
              */
             /*  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();
             }
@@ -936,6 +938,10 @@ static bool release_cmd(JCR *jcr)
 
 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);
 }