]> git.sur5r.net Git - bacula/bacula/commitdiff
Doc updates + fixed win32 crash in idcache cleanups + dlist class
authorKern Sibbald <kern@sibbald.com>
Fri, 11 Jul 2003 21:26:44 +0000 (21:26 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 11 Jul 2003 21:26:44 +0000 (21:26 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@632 91ce42f0-d328-0410-95d8-f526ca767f89

16 files changed:
bacula/ChangeLog
bacula/ReleaseNotes
bacula/kernstodo
bacula/src/dird/admin.c
bacula/src/filed/job.c
bacula/src/filed/restore.c
bacula/src/findlib/bfile.c
bacula/src/findlib/find.c
bacula/src/findlib/find_one.c
bacula/src/lib/attr.c
bacula/src/lib/idcache.c
bacula/src/lib/message.c
bacula/src/stored/acquire.c
bacula/src/stored/block.c
bacula/src/stored/btape.c
bacula/src/version.h

index 00df4f44236d17a4f045dd07528affe691b05d55..57f5d1acc21f9f204b0268ef69f2196541d4b5a4 100644 (file)
@@ -1,5 +1,16 @@
 
-2003-07-xx Version 1.31 Beta xxJul03
+2003-07-12 Version 1.31 Beta 10Jul03
+- Manual updates.
+- Clean up some unused variables detected by the IRIX compiler.
+- Test two directories on Win32 -- caused a crash. I forgot
+  to NULL the uid cache pointer after releasing it.
+- Use bstrncpy() instead of strcpy() in find_files.
+- Clear a few linked lists in the temp directory packed in find_one.c
+- Eliminate an unnecessary variable in attr.c
+- Clear the cache pointer after release in idcache.c
+- Implement a new C++ doubly linked list class.
+
+2003-07-08 Version 1.31 Beta 08Jul03
 - Update document for Win32 stuff.
 - Ensure VolStatus value for update is permitted.
 - Fix cached_path so that it is local to the jcr, otherwise, there
index 0f97e8e369261cbecb69bfbbef0afbf8e3330180..a6d160049073543db88e7f3397381bfa8387d174 100644 (file)
@@ -1,10 +1,10 @@
 
           Release Notes for Bacula 1.31
 
-  Bacula code: Total files = 253 Total lines = 75,225 (*.h *.c *.in)
+  Bacula code: Total files = 253 Total lines = 75,240 (*.h *.c *.in)
 
 Major Changes this Release:
-- The database format has changed. Please see below.
+- The database format has changed from version 1.30a. Please see below.
 - Support to save and restore all files on WinNT/2K/XP systems 
   including the permissions. Unfortunately files that are in use by another
   program cannot be saved.
@@ -17,7 +17,8 @@ Major Changes this Release:
   it is not installed in your system libraries.
 - Implemented generalized tape label formats including counter variables 
   for automatic naming of Volumes.
-- Multiple simultaneous jobs now work.
+- Multiple simultaneous jobs now work. However, I still don't highly
+  recommend it.
 - Implemented tape block rejection, which means that restores with
   several incremental backups will run orders of magnitude faster.
 
index 6b702b0b98e0059f72b320c2b0bbd0848451ce6c..86495102e2a5721728b57b37ee2cd700ea80ee94 100644 (file)
@@ -32,6 +32,26 @@ Testing to do: (painful)
 - Figure out how to use ssh or stunnel to protect Bacula communications.
 
 For 1.31 release:
+- Backup on havana gave:
+   *status storage
+   The defined Storage resources are:
+        1: File
+        2: DDS-3
+   Select Storage resource (1-2): 2
+   Connecting to Storage daemon DDS-3 at havana:9103
+
+   havana-sd Version: 1.31 (08 Jul 2003)
+   Daemon started 10-Jul-2003 19:06, 0 Jobs run.
+   Device /tmp is not open.
+   Device /dev/nst0 is mounted with Volume "msu-8Jul03"
+       Device is being initialized.
+       Total Bytes Read=4,629,249,084,728,272,628 Blocks Read=0 Bytes/block=134,735,604
+       Positioned at File=0 Block=0
+   Full Backup job msu-8Jul03 using Volume "msu-backup.2003-07-10_19.06.42" on device /dev/nst0
+       Files=0 Bytes=0 Bytes/sec=0
+       FDReadSeqNo=6 in_msg=6 out_msg=6 fd=7
+   ====
+
 - Do full check the command line args in update (e.g. VolStatus ...).
 - Maybe remove multiple simultaneous devices code in SD.
 - Increment DB version prior to releasing.
index 0b4f0144f1bc067c4e65147ea37f07a07a0262fb..6d919e625ade689930e0d236ce75182a2d7a3e17 100644 (file)
@@ -79,7 +79,6 @@ static void admin_cleanup(JCR *jcr, int TermCode)
    char *term_msg;
    int msg_type;
    MEDIA_DBR mr;
-   utime_t RunTime;
 
    Dmsg0(100, "Enter backup_cleanup()\n");
    memset(&mr, 0, sizeof(mr));
@@ -113,7 +112,6 @@ static void admin_cleanup(JCR *jcr, int TermCode)
    }
    bstrftime(sdt, sizeof(sdt), jcr->jr.StartTime);
    bstrftime(edt, sizeof(edt), jcr->jr.EndTime);
-   RunTime = jcr->jr.EndTime - jcr->jr.StartTime;
 
    Jmsg(jcr, msg_type, 0, _("Bacula " VERSION " (" LSMDATE "): %s\n\
 JobId:                  %d\n\
index 8c6652c4410b45b08e9de5bcdefc13dd063da597..186252429dbaa5fbf3a893b15d87013a60d14202 100644 (file)
@@ -904,12 +904,10 @@ static void filed_free_jcr(JCR *jcr)
  */
 int response(JCR *jcr, BSOCK *sd, char *resp, char *cmd)
 {
-   int n;
-
    if (sd->errors) {
       return 0;
    }
-   if ((n = bget_msg(sd)) > 0) {
+   if (bget_msg(sd) > 0) {
       Dmsg0(110, sd->msg);
       if (strcmp(sd->msg, resp) == 0) {
         return 1;
index bf1116abc8956478f87afc4e7b7697ac3281acb0..068306b060330a26d2dd2600516fe1e114c4247f 100644 (file)
@@ -42,7 +42,6 @@ static char rec_header[] = "rechdr %ld %ld %ld %ld %ld";
  */
 void do_restore(JCR *jcr)
 {
-   int wherelen;
    BSOCK *sd;
    int32_t stream;
    uint32_t size;
@@ -60,7 +59,6 @@ void do_restore(JCR *jcr)
    int prog_name_msg = 0;
    ATTR *attr;
    
-   wherelen = strlen(jcr->where);
 
    binit(&bfd);
    sd = jcr->store_bsock;
index a82c424e2f890f04b1a7c57724add08871c000fb..30761e1051f30e53ca7678e031899f6f860ed89f 100644 (file)
@@ -57,7 +57,6 @@ char *stream_to_ascii(int stream)
       return "GZIP data";
    case STREAM_SPARSE_GZIP_DATA:
       return "GZIP sparse data";
-      return "Win32 attributes";
    case STREAM_WIN32_DATA:
       return "Win32 data";
    case STREAM_WIN32_GZIP_DATA:
index edd6e9e4ef3c1d23e6553cb2e50a8d33f9450153..e4d544e27469017c81e8d4d8c5ff45b78dd87d70 100644 (file)
@@ -105,15 +105,15 @@ set_find_options(FF_PKT *ff, int incremental, time_t save_time, int mtime_only)
 int
 find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void *his_pkt) 
 {
-   char *file;
    struct s_included_file *inc = NULL;
 
    while (!job_canceled(jcr) && (inc = get_next_included_file(ff, inc))) {
-      file = inc->fname;
-      strcpy(ff->VerifyOpts, inc->VerifyOpts); /* Copy options for this file */
-      Dmsg1(50, "find_files: file=%s\n", file);
-      if (!file_is_excluded(ff, file)) {
-        if (!find_one_file(jcr, ff, callback, his_pkt, file, (dev_t)-1, 1)) {
+      /* Copy options for this file */
+      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)) {
            return 0;                  /* error return */
         }
       }
index b4d8240d97a99d4687f3524f3c6600b4e81f73ac..f10b80b79598db89ceb02ecb56b7b0bf2dbaa957 100755 (executable)
@@ -252,11 +252,16 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt),
        *   during the restore, the directory permissions will
        *   be reset after all the files have been restored.
        */
+      Dmsg1(300, "Create temp ff packet for dir: %s\n", ff_pkt->fname);
       FF_PKT *dir_ff_pkt = (FF_PKT *)bmalloc(sizeof(FF_PKT));
       memcpy(dir_ff_pkt, ff_pkt, sizeof(FF_PKT));
       dir_ff_pkt->fname = bstrdup(ff_pkt->fname);
       dir_ff_pkt->link = bstrdup(ff_pkt->link);
       dir_ff_pkt->sys_fname = get_pool_memory(PM_FNAME);
+      dir_ff_pkt->included_files_list = NULL;
+      dir_ff_pkt->excluded_files_list = NULL;
+      dir_ff_pkt->excluded_paths_list = NULL;
+      dir_ff_pkt->linklist = NULL;
        
       ff_pkt->link = ff_pkt->fname;     /* reset "link" */
 
index 4147da5670a6690313eca4e97d662e628170b60d..49023bea597d7c7f11b385dbd28f7fcb6a198a3f 100644 (file)
@@ -181,15 +181,11 @@ void print_ls_output(JCR *jcr, ATTR *attr)
    char buf[5000]; 
    char ec1[30];
    char *p, *f;
-   int n;
 
    p = encode_mode(attr->statp.st_mode, buf);
-   n = sprintf(p, "  %2d ", (uint32_t)attr->statp.st_nlink);
-   p += n;
-   n = sprintf(p, "%-8.8s %-8.8s", getuser(attr->statp.st_uid), getgroup(attr->statp.st_gid));
-   p += n;
-   n = sprintf(p, "%8.8s ", edit_uint64(attr->statp.st_size, ec1));
-   p += n;
+   p += sprintf(p, "  %2d ", (uint32_t)attr->statp.st_nlink);
+   p += sprintf(p, "%-8.8s %-8.8s", getuser(attr->statp.st_uid), getgroup(attr->statp.st_gid));
+   p += sprintf(p, "%8.8s ", edit_uint64(attr->statp.st_size, ec1));
    p = encode_time(attr->statp.st_ctime, p);
    *p++ = ' ';
    *p++ = ' ';
index 96f253bd106d4e2cab0d2a300b8e798ac3461b6c..8343df5d0df033e7151bac2b98bd1d540a52529c 100644 (file)
@@ -77,6 +77,7 @@ void free_getuser_cache()
      tail = tail->next;
      free(otail);
   }
+  user_alist = NULL;
   V(mutex);
 }
 
@@ -126,5 +127,6 @@ void free_getgroup_cache()
      tail = tail->next;
      free(otail);
   }
+  group_alist = NULL;
   V(mutex);
 }
index 436743fa00916bf159035444b091f56b458bc789..3ceb90402205e0d65507dc24bc12a3803bd51bb8 100755 (executable)
@@ -794,8 +794,6 @@ t_msg(char *file, int line, int level, char *fmt,...)
     va_list   arg_ptr;
     int       details = TRUE;
 
-    return;
-
     if (level < 0) {
        details = FALSE;
        level = -level;
index 5ea0884d76843b228d87d93868d93e94c95a4403..0138bbd32b35e9df01784c9a62a86118b3124801 100644 (file)
@@ -44,6 +44,7 @@ int acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
    int tape_previously_mounted;
    VOL_LIST *vol;
    int autochanger = 0;
+   int i;
 
    lock_device(dev);
    block_device(dev, BST_DOING_ACQUIRE);
@@ -63,12 +64,12 @@ int acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
       goto get_out;
    }
    jcr->CurVolume++;
-   for (int i=1; i<jcr->CurVolume; i++) {
+   for (i=1; i<jcr->CurVolume; i++) {
       vol = vol->next;
    }
    pm_strcpy(&jcr->VolumeName, vol->VolumeName);
 
-   for (int i=0; i<5; i++) {
+   for (i=0; i<5; i++) {
       if (job_canceled(jcr)) {
          Mmsg0(&dev->errmsg, _("Job canceled.\n"));
         goto get_out;                /* error return */
index 3f95c792ae26e9c84c7d8782bbd6ea525990bf2c..50a7cfa95506334f84738f557e1cf994bccb6121 100644 (file)
@@ -439,12 +439,12 @@ int write_block_to_dev(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
         /* Now back up over what we wrote and read the last block */
         if (bsf_dev(dev, 1) != 0 || bsf_dev(dev, 1) != 0) {
            ok = FALSE;
-            Jmsg(jcr, M_ERROR, 0, _("Back space file at EOT failed. ERR=%s\n"), strerror(dev->dev_errno));
+            Jmsg(jcr, M_ERROR, 0, _("Backspace file at EOT failed. ERR=%s\n"), strerror(dev->dev_errno));
         }
         /* Backspace over record */
         if (ok && bsr_dev(dev, 1) != 0) {
            ok = FALSE;
-            Jmsg(jcr, M_ERROR, 0, _("Back space record at EOT failed. ERR=%s\n"), strerror(dev->dev_errno));
+            Jmsg(jcr, M_ERROR, 0, _("Backspace record at EOT failed. ERR=%s\n"), strerror(dev->dev_errno));
            /*
             *  On FreeBSD systems, if the user got here, it is likely that his/her
              *    tape drive is "frozen".  The correct thing to do is a 
index fedf6e60b15f320a387f59ec9eaaae3a80fd45de..44f1eabea400e36660d3bdc3ab2a4b67b2bce063 100644 (file)
@@ -439,7 +439,7 @@ static void bsfcmd()
    if ((stat=bsf_dev(dev, 1)) < 0) {
       Pmsg1(0, _("Bad status from bsf. ERR=%s\n"), strerror(errno));
    } else {
-      Pmsg0(0, _("Back spaced one file.\n"));
+      Pmsg0(0, _("Backspaced one file.\n"));
    }
 }
 
@@ -453,7 +453,7 @@ static void bsrcmd()
    if ((stat=bsr_dev(dev, 1)) < 0) {
       Pmsg1(0, _("Bad status from bsr. ERR=%s\n"), strerror(errno));
    } else {
-      Pmsg0(0, _("Back spaced one record.\n"));
+      Pmsg0(0, _("Backspaced one record.\n"));
    }
 }
 
@@ -613,16 +613,16 @@ static int re_read_block_test()
    weofcmd();
    weofcmd();
    if (bsf_dev(dev, 1) != 0) {
-      Pmsg1(0, _("Back space file failed! ERR=%s\n"), strerror(dev->dev_errno));
+      Pmsg1(0, _("Backspace file failed! ERR=%s\n"), strerror(dev->dev_errno));
       goto bail_out;
    }
    if (bsf_dev(dev, 1) != 0) {
-      Pmsg1(0, _("Back space file failed! ERR=%s\n"), strerror(dev->dev_errno));
+      Pmsg1(0, _("Backspace file failed! ERR=%s\n"), strerror(dev->dev_errno));
       goto bail_out;
    }
    Pmsg0(0, "Backspaced over two EOFs OK.\n");
    if (bsr_dev(dev, 1) != 0) {
-      Pmsg1(0, _("Back space record failed! ERR=%s\n"), strerror(dev->dev_errno));
+      Pmsg1(0, _("Backspace record failed! ERR=%s\n"), strerror(dev->dev_errno));
       goto bail_out;
    }
    Pmsg0(0, "Backspace record OK.\n");
index 344dc34f6452dfe636050f87d022b00556afacd9..7c67104845127916353c92958bcf3af092ec0e17 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.31"
 #define VSTRING "1"
-#define BDATE   "08 Jul 2003"
-#define LSMDATE "08Jul03"
+#define BDATE   "10 Jul 2003"
+#define LSMDATE "10Jul03"
 
 /* Debug flags */
 #define DEBUG 1