]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/backup.c
Keep the same keywords as in previous version
[bacula/bacula] / bacula / src / dird / backup.c
index c71577913a0105e85ae4a2de9c3d84993990baed..668d5c55caac201ab47b2338e550f6290b25e735 100644 (file)
@@ -137,7 +137,9 @@ static bool get_base_jobids(JCR *jcr, db_list_ctx *jobids)
 }
 
 /*
- * Foreach files in currrent list, send "/path/fname\0LStat\0MD5" to FD
+ * Foreach files in currrent list, send "/path/fname\0LStat\0MD5\0Delta" to FD
+ *      row[0]=Path, row[1]=Filename, row[2]=FileIndex
+ *      row[3]=JobId row[4]=LStat row[5]=MarkId row[6]=MD5
  */
 static int accurate_list_handler(void *ctx, int num_fields, char **row)
 {
@@ -147,21 +149,21 @@ static int accurate_list_handler(void *ctx, int num_fields, char **row)
       return 1;
    }
    
-   if (row[2] == 0) {           /* discard when file_index == 0 */
+   if (row[2][0] == '0') {           /* discard when file_index == 0 */
       return 0;
    }
 
    /* sending with checksum */
    if (jcr->use_accurate_chksum 
-       && num_fields == 6 
-       && row[5][0] /* skip checksum = '0' */
-       && row[5][1])
+       && num_fields == 7 
+       && row[6][0] /* skip checksum = '0' */
+       && row[6][1])
    { 
-      jcr->file_bsock->fsend("%s%s%c%s%c%s", 
-                             row[0], row[1], 0, row[4], 0, row[5]); 
+      jcr->file_bsock->fsend("%s%s%c%s%c%s%c%s", 
+                             row[0], row[1], 0, row[4], 0, row[6], 0, row[5]); 
    } else {
-      jcr->file_bsock->fsend("%s%s%c%s", 
-                             row[0], row[1], 0, row[4]); 
+      jcr->file_bsock->fsend("%s%s%c%s%c%c%s", 
+                             row[0], row[1], 0, row[4], 0, 0, row[5]); 
    }
    return 0;
 }
@@ -229,8 +231,8 @@ static bool is_checksum_needed_by_fileset(JCR *jcr)
 /*
  * Send current file list to FD
  *    DIR -> FD : accurate files=xxxx
- *    DIR -> FD : /path/to/file\0Lstat\0MD5
- *    DIR -> FD : /path/to/dir/\0Lstat\0MD5
+ *    DIR -> FD : /path/to/file\0Lstat\0MD5\0Delta
+ *    DIR -> FD : /path/to/dir/\0Lstat\0MD5\0Delta
  *    ...
  *    DIR -> FD : EOD
  */
@@ -290,11 +292,12 @@ bool send_accurate_current_files(JCR *jcr)
    if (jcr->HasBase) {
       jcr->nb_base_files = str_to_int64(nb.list);
       db_create_base_file_list(jcr, jcr->db, jobids.list);
-      db_get_base_file_list(jcr, jcr->db, 
+      db_get_base_file_list(jcr, jcr->db, jcr->use_accurate_chksum,
                             accurate_list_handler, (void *)jcr);
 
    } else {
-      db_get_file_list(jcr, jcr->db_batch, jobids.list, 
+      db_get_file_list(jcr, jcr->db_batch,
+                       jobids.list, jcr->use_accurate_chksum, false /* no delta */,
                        accurate_list_handler, (void *)jcr);
    } 
 
@@ -705,7 +708,7 @@ void backup_cleanup(JCR *jcr, int TermCode)
    }
 // bmicrosleep(15, 0);                /* for debugging SIGHUP */
 
-   Jmsg(jcr, msg_type, 0, _("%s %s %s (%s): %s\n"
+   Jmsg(jcr, msg_type, 0, _("%s %s %s (%s):\n"
 "  Build OS:               %s %s %s\n"
 "  JobId:                  %d\n"
 "  Job:                    %s\n"
@@ -739,7 +742,7 @@ void backup_cleanup(JCR *jcr, int TermCode)
 "  FD termination status:  %s\n"
 "  SD termination status:  %s\n"
 "  Termination:            %s\n\n"),
-        BACULA, my_name, VERSION, LSMDATE, edt,
+        BACULA, my_name, VERSION, LSMDATE,
         HOST_OS, DISTNAME, DISTVER,
         jcr->jr.JobId,
         jcr->jr.Job,