]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/catreq.c
Fix bat seg fault
[bacula/bacula] / bacula / src / dird / catreq.c
index 47e0b4790209e3a4d8702b65f6a877fc92231b6f..910cc57d5ef81034cc64435d054b2863ae8c94f4 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -423,7 +423,8 @@ static void update_attribute(JCR *jcr, char *msg, int32_t msglen)
     *   File_index
     *   File_type
     *   Object_index
-    *   Object_len
+    *   Object_len (possibly compressed)
+    *   Object_full_len (not compressed)
     *   Object_compression
     *   Plugin_name
     *   Object_name
@@ -492,17 +493,23 @@ static void update_attribute(JCR *jcr, char *msg, int32_t msglen)
 
       Dmsg1(100, "Robj=%s\n", p);
       
-      skip_nonspaces(&p);             /* skip FileIndex */
+      skip_nonspaces(&p);                  /* skip FileIndex */
+      skip_spaces(&p);
+      ro.FileType = str_to_int32(p);        /* FileType */
+      skip_nonspaces(&p);
+      skip_spaces(&p);
+      ro.object_index = str_to_int32(p);    /* Object Index */
+      skip_nonspaces(&p);
+      skip_spaces(&p);
+      ro.object_len = str_to_int32(p);      /* object length possibly compressed */
+      skip_nonspaces(&p);                  
+      skip_spaces(&p);
+      ro.object_full_len = str_to_int32(p); /* uncompressed object length */
+      skip_nonspaces(&p);
       skip_spaces(&p);
-      ro.FileType = str_to_int32(p); 
-      skip_nonspaces(&p);             /* move past FileType */
+      ro.object_compression = str_to_int32(p); /* compression */
+      skip_nonspaces(&p);
       skip_spaces(&p);
-      ro.object_index = str_to_int32(p);
-      skip_nonspaces(&p);             /* move past object_index */
-      ro.object_len = str_to_int32(p);
-      skip_nonspaces(&p);             /* move past object_length */
-      ro.object_compression = str_to_int32(p);
-      skip_nonspaces(&p);             /* move past object_compression */
 
       ro.plugin_name = p;                      /* point to plugin name */
       len = strlen(ro.plugin_name);