]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Remove tests about "NULL Volume name. This shouldn't happen!!!*
authorEric Bollengier <eric@baculasystems.com>
Tue, 28 Nov 2017 09:19:39 +0000 (10:19 +0100)
committerKern Sibbald <kern@sibbald.com>
Mon, 4 Dec 2017 17:08:14 +0000 (18:08 +0100)
The device structure should not be accessed when it's not locked. Other jobs
can fill up the volume and change the volume when we start. Low level function
will ensure that everything is properly locked and that a volume is loaded.

bacula/src/stored/append.c

index db2cc1e190429f0d763620d8b75ff9f0843b08e9..144436ff280798453c6360e04004fd4c5c1e36df 100644 (file)
@@ -102,20 +102,11 @@ bool do_append_data(JCR *jcr)
    dev->start_of_job(dcr);
    jcr->sendJobStatus(JS_Running);
 
-   ASSERTD(dev->VolCatInfo.VolCatName[0], "NULL Volume name. This shouldn't happen!!!\n");
-   if (dev->VolCatInfo.VolCatName[0] == 0) {
-      Pmsg0(000, _("NULL Volume name. This shouldn't happen!!!\n"));
-   }
    Dmsg1(50, "Begin append device=%s\n", dev->print_name());
 
    begin_data_spool(dcr);
    begin_attribute_spool(jcr);
 
-   Dmsg0(100, "Just after acquire_device_for_append\n");
-   ASSERTD(dev->VolCatInfo.VolCatName[0], "NULL Volume name. This shouldn't happen!!!\n");
-   if (dev->VolCatInfo.VolCatName[0] == 0) {
-      Pmsg0(000, _("NULL Volume name. This shouldn't happen!!!\n"));
-   }
    /*
     * Write Begin Session Record
     */
@@ -126,11 +117,6 @@ bool do_append_data(JCR *jcr)
       ok = false;
    }
 
-   ASSERTD(dev->VolCatInfo.VolCatName[0], "NULL Volume name. This shouldn't happen!!!\n");
-   if (dev->VolCatInfo.VolCatName[0] == 0) {
-      Pmsg0(000, _("NULL Volume name. This shouldn't happen!!!\n"));
-   }
-
    /* Tell File daemon to send data */
    if (!fd->fsend(OK_data)) {
       berrno be;