]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/spool.c
kes Move the checking of the database in initializion of the Director
[bacula/bacula] / bacula / src / stored / spool.c
index 401cbe061288fd9f550b3c7c6ae6ef7f8104d48e..4cc076e312a36f7f87482bdf22e728098b2b5f10 100644 (file)
@@ -154,8 +154,8 @@ static void make_unique_data_spool_filename(DCR *dcr, POOLMEM **name)
    } else {
       dir = working_directory;
    }
-   Mmsg(name, "%s/%s.data.%s.%s.spool", dir, my_name, dcr->jcr->Job, 
-        dcr->device->hdr.name);
+   Mmsg(name, "%s/%s.data.%u.%s.%s.spool", dir, my_name, dcr->jcr->JobId,
+        dcr->jcr->Job, dcr->device->hdr.name);
 }
 
 
@@ -320,6 +320,7 @@ static bool despool_data(DCR *dcr, bool commit)
    free_pool_memory(rdev->errmsg);
    /* Be careful to NULL the jcr and free rdev after free_dcr() */
    rdcr->jcr = NULL;
+   rdcr->dev = NULL;
    free_dcr(rdcr);
    free(rdev);
    dcr->spooling = true;           /* turn on spooling again */