]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix pointer usage bugs in Verify InitCatalog pointed out by
authorKern Sibbald <kern@sibbald.com>
Sun, 13 May 2007 07:18:51 +0000 (07:18 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 13 May 2007 07:18:51 +0000 (07:18 +0000)
     Eric.

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

bacula/kernstodo
bacula/src/dird/fd_cmds.c
bacula/technotes-2.1

index 1be1e77cea37c6ff531356b922ac53a4a4f3da0b..d95512c804f78b714a60a2f7a53636cb29d9d2d1 100644 (file)
@@ -48,6 +48,10 @@ Professional Needs:
 - Detect state change of system (verify)
 
 Priority:
+- How does restore JobId=nnn work? (Dirk)
+- What does: restore select fileset="TestSet" client="workplay-fd" pool="Default"
+> storage="File2"  before="2007-02-05 23:05:04" do?  (Dirk)
+
 - Implement update jobid=
 - Mention Eric and Marc's work + Marc's doc.
 - Add TLS to bat
@@ -1717,4 +1721,3 @@ Block Position: 0
   apparently not.  This  happened when I removed the pool directive and 
   started the director.
 - Add Where: client:/.... to restore job report.
-
index b53b53d5c9846748242851c07002021e922e79c4..cbded15d4bed828c313d194e3c8cdc90d10222d2 100644 (file)
@@ -601,7 +601,6 @@ int get_attributes_and_put_in_catalog(JCR *jcr)
 
    fd = jcr->file_bsock;
    jcr->jr.FirstIndex = 1;
-   memset(&ar, 0, sizeof(ar));
    jcr->FileIndex = 0;
 
    Dmsg0(120, "bdird: waiting to receive file attributes\n");
@@ -622,6 +621,7 @@ int get_attributes_and_put_in_catalog(JCR *jcr)
       }
       /* Start transaction allocates jcr->attr and jcr->ar if needed */
       db_start_transaction(jcr, jcr->db);     /* start transaction if not already open */
+      ar = jcr->ar;
       p = fd->msg;
       /* The following three fields were sscanf'ed above so skip them */
       skip_nonspaces(&p);             /* skip FileIndex */
@@ -644,7 +644,6 @@ int get_attributes_and_put_in_catalog(JCR *jcr)
          }
          *fn = *p++;                     /* term filename and point to attribs */
          attr = p;
-         ar = jcr->ar;
          len = strlen(attr);
          jcr->attr = check_pool_memory_size(jcr->attr, len);
          memcpy(jcr->attr, attr, len);
index c38694dd44032dcee6cfe6f5f242ecdafe6d703f..2a924a9670515e202be10440a5fe8bd8c836cb94 100644 (file)
@@ -1,6 +1,9 @@
               Technical notes on version 2.1
 
 General:
+13May07
+kes  Fix pointer usage bugs in Verify InitCatalog pointed out by
+     Eric.
 12May07
 kes  Update the po files.
 kes  Fix Verify InitCatalog by making it cache attributes.