]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dircmd.c
Check pool memory size for truncate op
[bacula/bacula] / bacula / src / stored / dircmd.c
index 7626fbb4be59035b4947cc82dd545b257fc02422..fcb8c38d1846154586503959bfb4b7f3213b98eb 100644 (file)
@@ -250,8 +250,6 @@ bail_out:
    dequeue_messages(jcr);             /* send any queued messages */
    bs->signal(BNET_TERMINATE);
    free_jcr(jcr);
-   /* ***FIXME*** remove for production */
-   sm_check(__FILE__, __LINE__, true);
    return NULL;
 }
 
@@ -761,6 +759,9 @@ static bool mount_cmd(JCR *jcr)
             } else { /* must be file */
                dir->fsend(_("3906 File device %s is always mounted.\n"),
                   dev->print_name());
+               pthread_cond_broadcast(&dev->wait_next_vol);
+               Dmsg1(100, "JobId=%u broadcast wait_device_release\n", (uint32_t)dcr->jcr->JobId);
+               pthread_cond_broadcast(&wait_device_release);
             }
             break;
 
@@ -889,12 +890,16 @@ static bool action_on_purge_cmd(JCR *jcr)
    DCR *dcr;
    int action;
 
+   devname.check_size(dir->msglen+1);
+   volumename.check_size(dir->msglen+1);
+
    if (sscanf(dir->msg, "action_on_purge %127s vol=%s action=%d",
               devname.c_str(), volumename.c_str(), &action) != 3) {
       dir->fsend(_("3916 Error scanning action_on_purge command\n"));
       goto done;
    }
    unbash_spaces(volumename.c_str());
+   unbash_spaces(devname.c_str());
 
    /* FIXME: autochanger, drive = 0? how can we avoid that? we only work on
     * files