]> git.sur5r.net Git - bacula/bacula/commitdiff
- Correct segfault in message.c with debug=200 (new code).
authorKern Sibbald <kern@sibbald.com>
Tue, 21 Sep 2004 14:25:24 +0000 (14:25 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 21 Sep 2004 14:25:24 +0000 (14:25 +0000)
- Fix bug 109 verify with no options prints garbage.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1605 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/verify.c
bacula/src/findlib/find.c
bacula/src/lib/message.c
bacula/src/version.h

index 8b58dc5694ce8760ebbb136fe847f59499c55b21..f11edb4c31be7627776d669cdec19c6d6cbdde27 100644 (file)
@@ -175,7 +175,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt)
      
    P(jcr->mutex);
    jcr->JobFiles++;                 /* increment number of files sent */
-   pm_strcpy(&jcr->last_fname, ff_pkt->fname);
+   pm_strcpy(jcr->last_fname, ff_pkt->fname);
    V(jcr->mutex);
 
    /* 
index d676f9690862fe4dd07e9db9d281b0164b198615..4180319cf625c3ee28ba3678b91b322fcecb24a9 100644 (file)
@@ -111,7 +111,8 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void
    if (fileset) {
       int i, j;
       ff->flags = 0;
-      ff->VerifyOpts[0] = 0;
+      ff->VerifyOpts[0] = 'V';
+      ff->VerifyOpts[1] = 0;
       for (i=0; i<fileset->include_list.size(); i++) {
         findINCEXE *incexe = (findINCEXE *)fileset->include_list.get(i);
         fileset->incexe = incexe;
@@ -123,7 +124,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void
            findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j);
            ff->flags |= fo->flags;
            ff->GZIP_level = fo->GZIP_level;
-           bstrncpy(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts)); 
+           bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts)); 
         }
         for (j=0; j<incexe->name_list.size(); j++) {
             Dmsg1(400, "F %s\n", (char *)incexe->name_list.get(j));
@@ -139,7 +140,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void
       /* This is the old deprecated way */
       while (!job_canceled(jcr) && (inc = get_next_included_file(ff, inc))) {
         /* Copy options for this file */
-        bstrncpy(ff->VerifyOpts, inc->VerifyOpts, sizeof(ff->VerifyOpts)); 
+        bstrncat(ff->VerifyOpts, inc->VerifyOpts, sizeof(ff->VerifyOpts)); 
          Dmsg1(50, "find_files: file=%s\n", inc->fname);
         if (!file_is_excluded(ff, inc->fname)) {
            if (find_one_file(jcr, ff, callback, his_pkt, inc->fname, (dev_t)-1, 1) ==0) {
index 74cb46a2b9a0f762f5399200c8d613cb621c89e4..0ef376010560722923f1a396895e594dd148ac47 100755 (executable)
@@ -365,7 +365,7 @@ static void make_unique_mail_filename(JCR *jcr, POOLMEM *&name, DEST *d)
       Mmsg(name, "%s/%s.mail.%s.%d", working_directory, my_name,
                 my_name, (int)(long)d);
    }
-   Dmsg1(200, "mailname=%s\n", *name);
+   Dmsg1(200, "mailname=%s\n", name);
 }
 
 /*
index 924b5c0e0325beadd7a60b3a75de6183fadb6bd4..c67a74e251839cc9adc2c5965c0ae743ddef2a81 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #undef  VERSION
 #define VERSION "1.35.4"
-#define BDATE   "20 September 2004"
-#define LSMDATE "20Sep04"
+#define BDATE   "21 September 2004"
+#define LSMDATE "21Sep04"
 
 /* Debug flags */
 #undef  DEBUG