]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/verify.c
Final changes
[bacula/bacula] / bacula / src / filed / verify.c
index d094d0bb91bed0b7bb3043b405996888ab8d727c..aa75e463fe7f573e4416b57aafff11f1131fb079 100644 (file)
@@ -44,7 +44,7 @@ void do_verify(JCR *jcr)
       Jmsg1(jcr, M_ABORT, 0, _("Cannot malloc %d network read buffer\n"), 
         DEFAULT_NETWORK_BUFFER_SIZE);
    }
-   set_find_options((FF_PKT *)jcr->ff, jcr->incremental, jcr->mtime, jcr->mtime_only);
+   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);  
@@ -94,7 +94,9 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt)
    case FT_LNK:
       Dmsg2(30, "FT_LNK saving: %s -> %s\n", ff_pkt->fname, ff_pkt->link);
       break;
-   case FT_DIR:
+   case FT_DIRBEGIN:
+      return 1;                      /* ignored */
+   case FT_DIREND:
       Dmsg1(30, "FT_DIR saving: %s\n", ff_pkt->fname);
       break;
    case FT_SPEC:
@@ -179,7 +181,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt)
       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_DIR) {
+   } else if (ff_pkt->type == FT_DIREND) {
       /* 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, 
@@ -203,7 +205,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt)
       char MD5buf[40];               /* 24 should do */
       MD5Init(&md5c);
       while ((n=bread(&bfd, jcr->big_buf, jcr->buf_size)) > 0) {
-        MD5Update(&md5c, ((unsigned char *) jcr->big_buf), n);
+        MD5Update(&md5c, ((unsigned char *)jcr->big_buf), (int)n);
         jcr->JobBytes += n;
         jcr->ReadBytes += n;
       }
@@ -223,7 +225,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt)
       char SHA1buf[40];              /* 24 should do */
       SHA1Init(&sha1c);
       while ((n=bread(&bfd, jcr->big_buf, jcr->buf_size)) > 0) {
-        SHA1Update(&sha1c, ((unsigned char *) jcr->big_buf), n);
+        SHA1Update(&sha1c, ((unsigned char *)jcr->big_buf), (int)n);
         jcr->JobBytes += n;
         jcr->ReadBytes += n;
       }