]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/serial.h
First cut of bat rerun a Job from Jobs Run
[bacula/bacula] / bacula / src / lib / serial.h
index 615128754348c292184c461c586822cbb0e77798..ca35d06584a7bb00beb23c1f4f9ebfcbd45eade6 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
 
    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.
@@ -29,7 +29,6 @@
  *
  * Written by John Walker, MM
  *
- *   Version $Id$
  */
 
 /*  Serialisation support functions from serial.c.  */
@@ -52,7 +51,7 @@ extern int64_t unserial_int64(uint8_t * * const ptr);
 extern uint64_t unserial_uint64(uint8_t * * const ptr);
 extern btime_t unserial_btime(uint8_t * * const ptr);
 extern float64_t unserial_float64(uint8_t * * const ptr);
-extern void unserial_string(uint8_t * * const ptr, char * const str);
+extern void unserial_string(uint8_t * * const ptr, char * const str, int max);
 
 /*
 
@@ -165,7 +164,10 @@ extern void unserial_string(uint8_t * * const ptr, char * const str);
 /*  Binary byte stream not requiring serialisation (length obtained by sizeof)  */
 #define unser_buffer(x)  unser_bytes((x), (sizeof (x)))
 
-/* Binary string not requiring serialization */
-#define unser_string(x) unserial_string(&ser_ptr, (x))
+/* Binary string not requiring serialization (length obtained from max) */
+#define unser_nstring(x,max) unserial_string(&ser_ptr, (x), (int)(max))
+
+/*  Binary string not requiring serialisation (length obtained by sizeof)  */
+#define unser_string(x) unserial_string(&ser_ptr, (x), sizeof(x))
 
 #endif /* __SERIAL_H_ */