]> git.sur5r.net Git - bacula/bacula/commitdiff
Additional error checking
authorKern Sibbald <kern@sibbald.com>
Thu, 29 Aug 2002 13:02:17 +0000 (13:02 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 29 Aug 2002 13:02:17 +0000 (13:02 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@128 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/stored/label.c
bacula/src/stored/read.c

index 3e76f18b8565bc8aacc5f36decb1973f028f7bcc..45d0d40d57547d7ad0db5308f6605a07aaf69509 100644 (file)
@@ -28,6 +28,8 @@ From Chuck:
 --sd.conf password does not match dir.conf storage password
 =======
 
+- Correct Warning: Volume name mismatch. Wanted test2 got test1
+  when reading a tape and want the next one.
 - Create all pools when Director starts
 - Implement autochanger for restore. ARRRGGG! I forgot!
 - Make BSR accept count (total files to be restored).
index 14c15b7f09ed81124a4958ba471a2e5ba3b07d4d..1570709b0a5525ce3710d164deb3a5f8289e6693 100644 (file)
@@ -489,6 +489,7 @@ int write_session_label(JCR *jcr, DEV_BLOCK *block, int label)
     *  read the next block).
     */
    if (!can_write_record_to_block(block, rec)) {
+      Dmsg0(100, "Cannot write session label to block.\n");
       if (!write_block_to_device(jcr, dev, block)) {
          Dmsg0(90, "Got session label write_block_to_dev error.\n");
          Jmsg(jcr, M_FATAL, 0, _("Error writing Session label to %s: %s\n"), 
@@ -497,7 +498,12 @@ int write_session_label(JCR *jcr, DEV_BLOCK *block, int label)
         return 0;
       }
    }
-   write_record_to_block(block, rec);
+   if (!write_record_to_block(block, rec)) {
+      Jmsg(jcr, M_FATAL, 0, _("Error writing Session label to %s: %s\n"), 
+                       dev_vol_name(dev), strerror(errno));
+      free_record(rec);
+      return 0;
+   }
 
    Dmsg6(20, "Write sesson_label record JobId=%d FI=%s SessId=%d Strm=%s len=%d\n\
 remainder=%d\n", jcr->JobId,
index b4037e813d3404b18897ebcd6a9daf31bfb5a09a..52cc6ad58ef13658ce67f36a96eae61a97296f70 100644 (file)
@@ -202,7 +202,7 @@ int do_read_data(JCR *jcr)
         ds->msglen = rec->data_len;
          Dmsg1(40, ">filed: send %d bytes data.\n", ds->msglen);
         if (!bnet_send(ds)) {
-            Dmsg1(000, "Error sending to FD. ERR=%s\n", bnet_strerror(ds));
+            Pmsg1(000, "Error sending to FD. ERR=%s\n", bnet_strerror(ds));
             Dmsg1(100, "Hdr=%s\n", hdr);
             Dmsg1(100, "data=%s\n", ds->msg);
             Jmsg1(jcr, M_FATAL, 0, _("Error sending to File daemon. ERR=%s\n"),