]> 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 8ce44e5beb9ab0dec053181ac8674fd244501fb6..fcb8c38d1846154586503959bfb4b7f3213b98eb 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -759,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;
 
@@ -887,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