}
/*
- * 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)
{
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;
}
/*
* 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
*/
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);
}
}
// 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"
" 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,