]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/verify_vol.c
Make hangup single shot
[bacula/bacula] / bacula / src / filed / verify_vol.c
index 3a29808bf930dbc953ac0a4830b8f32dfcd344fe..bf0ef5c8cf896ff2d3ab9c6e1924597451c3179e 100644 (file)
@@ -1,21 +1,12 @@
-/*
- *  Bacula File Daemon  verify-vol.c Verify files on a Volume
- *    versus attributes in Catalog
- *
- *    Kern Sibbald, July MMII
- *
- *   Version $Id$
- *
- */
 /*
    Bacula® - The Network Backup Solution
 
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2002-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2002-2010 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.
    This program is Free Software; you can redistribute it and/or
 
    The main author of Bacula is Kern Sibbald, with contributions from
    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
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -24,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ *  Bacula File Daemon  verify-vol.c Verify files on a Volume
+ *    versus attributes in Catalog
+ *
+ *    Kern Sibbald, July MMII
+ *
+ */
 
 #include "bacula.h"
 #include "filed.h"
 
 #include "bacula.h"
 #include "filed.h"
@@ -147,12 +145,6 @@ void do_verify_volume(JCR *jcr)
             goto bail_out;
          }
          Dmsg2(30, "Got Attr: FilInx=%d type=%d\n", record_file_index, type);
             goto bail_out;
          }
          Dmsg2(30, "Got Attr: FilInx=%d type=%d\n", record_file_index, type);
-         if (record_file_index != file_index) {
-            Jmsg(jcr, M_FATAL, 0, _("Record header file index %ld not equal record index %ld\n"),
-               file_index, record_file_index);
-            Dmsg0(0, "File index error\n");
-            goto bail_out;
-         }
          ap = sd->msg;
          while (*ap++ != ' ')         /* skip record file index */
             ;
          ap = sd->msg;
          while (*ap++ != ' ')         /* skip record file index */
             ;
@@ -199,6 +191,11 @@ void do_verify_volume(JCR *jcr)
             stat = bnet_fsend(dir, "%d %d %s %s%c%s%c%s%c", jcr->JobFiles,
                           STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,
                           0, ap, 0, lname, 0);
             stat = bnet_fsend(dir, "%d %d %s %s%c%s%c%s%c", jcr->JobFiles,
                           STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,
                           0, ap, 0, lname, 0);
+         /* for a deleted record, we set fileindex=0 */
+         } else if (type == FT_DELETED)  {
+            stat = bnet_fsend(dir,"%d %d %s %s%c%s%c%c", 0,
+                          STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,
+                          0, ap, 0, 0);
          } else {
             stat = bnet_fsend(dir,"%d %d %s %s%c%s%c%c", jcr->JobFiles,
                           STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,
          } else {
             stat = bnet_fsend(dir,"%d %d %s %s%c%s%c%c", jcr->JobFiles,
                           STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,