]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/spool.c
Move reservations message lock to lock jcr only this
[bacula/bacula] / bacula / src / stored / spool.c
index bf8687945ebc228ef0ed8b9d0612084863df9bc1..62426a0c34c13947a23327364ba5607e808869a4 100644 (file)
@@ -7,8 +7,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -257,9 +257,8 @@ static bool despool_data(DCR *dcr, bool commit)
    rdev->max_block_size = dcr->dev->max_block_size;
    rdev->min_block_size = dcr->dev->min_block_size;
    rdev->device = dcr->dev->device;
-   rdcr = new_dcr(jcr, rdev);
+   rdcr = new_dcr(jcr, NULL, rdev);
    rdcr->spool_fd = dcr->spool_fd;
-   rdcr->jcr = jcr;                   /* set a valid jcr */
    block = dcr->block;                /* save block */
    dcr->block = rdcr->block;          /* make read and write block the same */
 
@@ -678,6 +677,6 @@ bool close_attr_spool_file(JCR *jcr, BSOCK *bs)
    unlink(name);
    free_pool_memory(name);
    bs->m_spool_fd = NULL;
-   bs->m_spool = false;
+   bs->clear_spooling();
    return true;
 }