Imported Upstream version 2.4.5
[debian/amanda] / server-src / dumper.c
index 48b8d1087aa8fae0ce222f567f4b65a4fb76d8a8..92af8e874209aa47738be2f713a245aa0f6e46d0 100644 (file)
@@ -23,7 +23,7 @@
  * Authors: the Amanda Development Team.  Its members are listed in a
  * file named AUTHORS, in the root directory of this distribution.
  */
-/* $Id: dumper.c,v 1.75.2.14.2.7.2.17 2003/10/30 18:09:27 martinea Exp $
+/* $Id: dumper.c,v 1.75.2.14.2.7.2.17.2.3 2005/03/31 13:08:05 martinea Exp $
  *
  * requests remote amandad processes to dump filesystems
  */
@@ -668,7 +668,12 @@ int *p_outfd, size;
 
        NAUGHTY_BITS;
 
-       while(size > 0 && split_size > 0 && dumpsize >= split_size) {
+       /* We open a new chunkfile if                                    */
+       /*   We have something to write (dataout < datain)               */
+       /*   We have a split_size defined (split_size > 0)               */
+       /*   The current file is already filled (dumpsize >= split_size) */
+
+       while(dataout < datain && split_size > 0 && dumpsize >= split_size) {
            amfree(new_filename);
            if(use == 0) {
                /*
@@ -679,12 +684,13 @@ int *p_outfd, size;
                 if(cmd == CONTINUE) {
                    /*
                     * CONTINUE
+                    *   serial
                     *   filename
                     *   chunksize
                     *   use
                     */
                    cmdargs.argc++;             /* true count of args */
-                   a = 2;
+                   a = 3;
 
                    if(a >= cmdargs.argc) {
                        error("error [dumper CONTINUE: not enough args: filename]");
@@ -955,6 +961,12 @@ char *str;
            break;
        }
 #undef sc
+#define sc "sendbackup: warning"
+       if(strncmp(str, sc, sizeof(sc)-1) == 0) {
+           dump_result = max(dump_result, 1);
+           break;
+       }
+#undef sc
 #define sc "sendbackup: error"
        if(strncmp(str, sc, sizeof(sc)-1) == 0) {
            s += sizeof(sc)-1;