]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/verify.c
kes Generally clean up the manual tape loading code. The main
[bacula/bacula] / bacula / src / filed / verify.c
index 18ebe09d7fa070cc3e76e1d3aa3b59eac11fc3ff..32c753ae6ec2962b05b70e53281e0a2fb6f271e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 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.
@@ -37,7 +37,7 @@
 #include "bacula.h"
 #include "filed.h"
 
-static int verify_file(FF_PKT *ff_pkt, void *my_pkt, bool);
+static int verify_file(JCR *jcr, FF_PKT *ff_pkt, bool);
 static int read_digest(BFILE *bfd, DIGEST *digest, JCR *jcr);
 
 /*
@@ -56,7 +56,7 @@ void do_verify(JCR *jcr)
    set_find_options((FF_PKT *)jcr->ff, jcr->incremental, jcr->mtime);
    Dmsg0(10, "Start find files\n");
    /* Subroutine verify_file() is called for each file */
-   find_files(jcr, (FF_PKT *)jcr->ff, verify_file, (void *)jcr);
+   find_files(jcr, (FF_PKT *)jcr->ff, verify_file, NULL);
    Dmsg0(10, "End find files\n");
 
    if (jcr->big_buf) {
@@ -71,7 +71,7 @@ void do_verify(JCR *jcr)
  *
  *  Find the file, compute the MD5 or SHA1 and send it back to the Director
  */
-static int verify_file(FF_PKT *ff_pkt, void *pkt, bool top_level)
+static int verify_file(JCR *jcr, FF_PKT *ff_pkt, bool top_level)
 {
    char attribs[MAXSTRING];
    char attribsEx[MAXSTRING];
@@ -79,7 +79,6 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt, bool top_level)
    int stat;
    DIGEST *digest = NULL;
    BSOCK *dir;
-   JCR *jcr = (JCR *)pkt;
 
    if (job_canceled(jcr)) {
       return 0;
@@ -104,6 +103,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt, bool top_level)
    case FT_DIRBEGIN:
       jcr->num_files_examined--;      /* correct file count */
       return 1;                       /* ignored */
+   case FT_REPARSE: 
    case FT_DIREND:
       Dmsg1(30, "FT_DIR saving: %s\n", ff_pkt->fname);
       break;
@@ -190,7 +190,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt, bool top_level)
       stat = bnet_fsend(dir, "%d %d %s %s%c%s%c%s%c", jcr->JobFiles,
             STREAM_UNIX_ATTRIBUTES, ff_pkt->VerifyOpts, ff_pkt->fname,
             0, attribs, 0, ff_pkt->link, 0);
-   } else if (ff_pkt->type == FT_DIREND) {
+   } else if (ff_pkt->type == FT_DIREND || ff_pkt->type == FT_REPARSE) {
          /* Here link is the canonical filename (i.e. with trailing slash) */
          stat = bnet_fsend(dir,"%d %d %s %s%c%s%c%c", jcr->JobFiles,
                STREAM_UNIX_ATTRIBUTES, ff_pkt->VerifyOpts, ff_pkt->link,