]> git.sur5r.net Git - bacula/bacula/commitdiff
Final changes
authorKern Sibbald <kern@sibbald.com>
Wed, 9 Jun 2004 11:52:24 +0000 (11:52 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 9 Jun 2004 11:52:24 +0000 (11:52 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1400 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/ReleaseNotes
bacula/src/filed/backup.c
bacula/src/filed/job.c
bacula/src/filed/verify.c
bacula/src/findlib/find.c
bacula/src/findlib/find_one.c
bacula/src/version.h

index cae0d5befad62ce31d0c7c9ff2b9326fdaf2e15b..83d5c6d225baa1eeabdadaf770fdb54cc7bdc621 100644 (file)
@@ -1,5 +1,24 @@
 
-2004-06-xx Version 1.34.3 xxJun04 Release
+2004-06-09 Version 1.34.3 09Jun04 Release
+09Jun04
+- Add missing FT codes in new FileSet callback, which caused error
+  return on unchanged directories.
+08Jun04
+- Fix "update volumes" move from one pool to another.
+- Change default search location for PostgreSQL -- thanks
+  to Hans-Ulrich Schaefer.
+06Jun04
+- Zero Slot if not autochanger in stored/mount.c
+- As a last ditch effort to mount the next tape in mount.c, zero slot
+  and ask sysop.                 
+- Win32 status was picking up the first status in the list job terminated
+  jobs instead of the last.
+05Jun04
+- Add additional fields to llist pools
+- Correct some minor label scan problems with update slots
+- Ensure correct Pool is used with tape cleaning prefixes.
+- Eliminate false error message in update slots (slots taken as
+  Storage device).
 02Jun04
 - Print "Unimplemented" message if user does reload command in Console.
 - Add DISTINCT to Volumes for restore in query message (user supplied fix).
index 48522ab9d4b03be57bac0effdf4a85666a52138d..a7b47c8492c66c778d9fc8c88c4c22cf2f2cf756 100644 (file)
@@ -1,5 +1,5 @@
 
-          Release Notes for Bacula 1.34.2
+          Release Notes for Bacula 1.34.3
 
   Bacula code: Total files = 364 Total lines = 102,925 (*.h *.c *.in)
 
index 0e7a69627d53ff99f590a22e4132cd755e75c8ef..8571be775e1b944794b995b0290dcdf0fa14b32f 100644 (file)
@@ -66,6 +66,7 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr)
    }
    if (!bnet_set_buffer_size(sd, buf_size, BNET_SETBUF_WRITE)) {
       set_jcr_job_status(jcr, JS_ErrorTerminated);
+      Jmsg(jcr, M_FATAL, 0, _("Cannot set buffer size FD->SD.\n"));
       return 0;
    }
 
@@ -89,6 +90,7 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr)
    if (!find_files(jcr, (FF_PKT *)jcr->ff, save_file, (void *)jcr)) {
       stat = 0;                      /* error */
       set_jcr_job_status(jcr, JS_ErrorTerminated);
+      Jmsg(jcr, M_FATAL, 0, _("Find files error.\n"));
    }
 
    stop_heartbeat_monitor(jcr);
@@ -113,6 +115,10 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr)
  *  *****FIXME*****   add FSMs File System Modules
  *
  *  Send the file and its data to the Storage daemon.
+ *
+ *  Returns: 1 if OK
+ *          0 if error
+ *         -1 to ignore file/directory (not used here)
  */
 static int save_file(FF_PKT *ff_pkt, void *vjcr)
 {
@@ -296,6 +302,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr)
         bclose(&ff_pkt->bfd);
       }
       set_jcr_job_status(jcr, JS_ErrorTerminated);
+      Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n"));
       return 0;
    }
    bnet_sig(sd, BNET_EOD);           /* indicate end of attributes data */
@@ -340,6 +347,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr)
       if (!bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, data_stream)) {
         bclose(&ff_pkt->bfd);
         set_jcr_job_status(jcr, JS_ErrorTerminated);
+         Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n"));
         return 0;
       }
       Dmsg1(300, ">stored: datahdr %s\n", sd->msg);
@@ -432,6 +440,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr)
               sd->msglen = 0;
               bclose(&ff_pkt->bfd);
               set_jcr_job_status(jcr, JS_ErrorTerminated);
+               Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n"));
               return 0;
            }
         }
@@ -451,6 +460,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr)
       bclose(&ff_pkt->bfd);             /* close file */
       if (!bnet_sig(sd, BNET_EOD)) {    /* indicate end of file data */
         set_jcr_job_status(jcr, JS_ErrorTerminated);
+         Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n"));
         return 0;
       }
    }
index e08f11d4f61549e542d3a58a85d1daf251969b9c..f29491699f901bc4a7c7075c6f094b5e54a3aa55 100644 (file)
@@ -161,7 +161,8 @@ static char read_close[]   = "read close session %d\n";
  */
 void *handle_client_request(void *dirp)
 {
-   int i, found, quit;
+   int i; 
+   bool found, quit;
    JCR *jcr;
    BSOCK *dir = (BSOCK *)dirp;
 
@@ -178,7 +179,7 @@ void *handle_client_request(void *dirp)
 
    /**********FIXME******* add command handler error code */
 
-   for (quit=0; !quit;) {
+   for (quit=false; !quit;) {
 
       /* Read command */
       if (bnet_recv(dir) < 0) {
@@ -186,24 +187,25 @@ void *handle_client_request(void *dirp)
       }
       dir->msg[dir->msglen] = 0;
       Dmsg1(100, "<dird: %s", dir->msg);
-      found = FALSE;
+      found = false;
       for (i=0; cmds[i].cmd; i++) {
         if (strncmp(cmds[i].cmd, dir->msg, strlen(cmds[i].cmd)) == 0) {
            if (!jcr->authenticated && cmds[i].func != hello_cmd) {
               bnet_fsend(dir, no_auth);
               break;
            }
-           found = TRUE;                /* indicate command found */
+           found = true;                /* indicate command found */
+            Dmsg1(100, "Executing %s command.\n", cmds[i].cmd);
            if (!cmds[i].func(jcr)) {    /* do command */
-              quit = TRUE;              /* error or fully terminated,  get out */
-               Dmsg0(20, "Command error or Job done.\n");
+              quit = true;              /* error or fully terminated,  get out */
+               Dmsg0(20, "Quit command loop due to command error or Job done.\n");
            }
            break;
         }
       }
       if (!found) {                  /* command not found */
         bnet_fsend(dir, errmsg);
-        quit = TRUE;
+        quit = true;
         break;
       }
    }
@@ -960,7 +962,7 @@ static int level_cmd(JCR *jcr)
         his_time = str_to_uint64(buf);
         rt = get_current_btime() - bt_start; /* compute round trip time */
         bt_adj -= his_time - bt_start - rt/2;
-         Dmsg2(100, "rt=%s adj=%s\n", edit_uint64(rt, ed1), edit_uint64(bt_adj, ed2));
+         Dmsg2(200, "rt=%s adj=%s\n", edit_uint64(rt, ed1), edit_uint64(bt_adj, ed2));
       }
 
       bt_adj = bt_adj / 8;           /* compute average time */
@@ -1122,6 +1124,7 @@ static int backup_cmd(JCR *jcr)
    if (!blast_data_to_storage_daemon(jcr, NULL)) {
       set_jcr_job_status(jcr, JS_ErrorTerminated);
       bnet_suppress_error_messages(sd, 1);
+      Dmsg0(110, "Error in blast_data.\n");
    } else {
       set_jcr_job_status(jcr, JS_Terminated);
       if (jcr->JobStatus != JS_Terminated) {
@@ -1167,10 +1170,10 @@ static int backup_cmd(JCR *jcr)
    }
 
 cleanup:
-
    bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles, 
       edit_uint64(jcr->ReadBytes, ed1), 
       edit_uint64(jcr->JobBytes, ed2), jcr->Errors);   
+   Dmsg1(110, "End FD msg: %s\n", dir->msg);
 
    return 0;                         /* return and stop command loop */
 }
index 7f919e039a23243cb37dc858f0adcd73183429b0..aa75e463fe7f573e4416b57aafff11f1131fb079 100644 (file)
@@ -205,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;
       }
@@ -225,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;
       }
index d9ec87cd3950f82faf8be6c419e461b7154e79c3..b74f90c2d4561a793343996b29273c708b4d9ab5 100644 (file)
@@ -129,7 +129,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void
         for (j=0; j<incexe->name_list.size(); j++) {
             Dmsg1(400, "F %s\n", (char *)incexe->name_list.get(j));
            char *fname = (char *)incexe->name_list.get(j);
-           if (!find_one_file(jcr, ff, our_callback, his_pkt, fname, (dev_t)-1, 1)) {
+           if (find_one_file(jcr, ff, our_callback, his_pkt, fname, (dev_t)-1, 1) == 0) {
               return 0;                  /* error return */
            }
         }
@@ -143,7 +143,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void
         bstrncpy(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)) {
+           if (find_one_file(jcr, ff, callback, his_pkt, inc->fname, (dev_t)-1, 1) ==0) {
               return 0;                  /* error return */
            }
         }
@@ -205,6 +205,7 @@ static int our_callback(FF_PKT *ff, void *hpkt)
    case FT_NOFOLLOW:
    case FT_NOSTAT:
    case FT_NOCHG:
+   case FT_DIRNOCHG:
    case FT_ISARCH:
    case FT_NORECURSE:
    case FT_NOFSCHG:
@@ -218,14 +219,20 @@ static int our_callback(FF_PKT *ff, void *hpkt)
    case FT_LNK:
    case FT_DIRBEGIN:
    case FT_DIREND:
+   case FT_RAW:
+   case FT_FIFO:
    case FT_SPEC:
       if (accept_file(ff)) {
         return ff->callback(ff, hpkt);
       } else {
-        return 0;
+         Dmsg1(100, "Skip file %s\n", ff->fname);
+        return -1;                   /* ignore this file */
       }
-   }   
-   return 0;
+
+   default:
+      Dmsg1(000, "Unknown FT code %d\n", ff->type);
+      return 0;
+   }
 }
 
 
index 1ffee61095497b13f7b2b4bcdf673bda94bf1288..15ff905d191ae55cbf099b3cb868cd5ae044f203 100755 (executable)
@@ -258,9 +258,10 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt),
        * do not immediately save it, but do so only after everything
        * in the directory is seen (i.e. the FT_DIREND).
        */
-      if (!handle_file(ff_pkt, pkt)) {
+      rtn_stat = handle_file(ff_pkt, pkt);
+      if (rtn_stat < 1) {            /* ignore or error status */
         free(link);
-        return 0;                    /* Do not save this directory */
+        return rtn_stat;
       }
       /* Done with DIRBEGIN, next call will be DIREND */
       if (ff_pkt->type == FT_DIRBEGIN) {
index 8984448c11e52521cbd35cd68cf21315382a0bfa..cc881883c569cb5f3e58ed2a8b88fc9ada874b23 100644 (file)
@@ -2,8 +2,8 @@
 #undef  VERSION
 #define VERSION "1.34.3"
 #define VSTRING "1"
-#define BDATE   "08 June 2004"
-#define LSMDATE "08Jun04"
+#define BDATE   "09 June 2004"
+#define LSMDATE "09Jun04"
 
 /* Debug flags */
 #undef  DEBUG