if (elt->seen) {
Dmsg2(dbglvl, "base file fname=%s seen=%i\n", elt->fname, elt->seen);
/* TODO: skip the decode and use directly the lstat field */
- decode_stat(elt->lstat, &statc, &LinkFIc); /* decode catalog stat */
+ decode_stat(elt->lstat, &statc, sizeof(statc), &LinkFIc); /* decode catalog stat */
ff_pkt->fname = elt->fname;
ff_pkt->statp = statc;
encode_and_send_attributes(jcr, ff_pkt, stream);
}
Dmsg2(dbglvl, "deleted fname=%s seen=%i\n", elt->fname, elt->seen);
/* TODO: skip the decode and use directly the lstat field */
- decode_stat(elt->lstat, &statc, &LinkFIc); /* decode catalog stat */
+ decode_stat(elt->lstat, &statc, sizeof(statc), &LinkFIc); /* decode catalog stat */
ff_pkt->fname = elt->fname;
ff_pkt->statp.st_mtime = statc.st_mtime;
ff_pkt->statp.st_ctime = statc.st_ctime;
bool ret = true;
CurFile *item;
- /* we store CurFile, fname and ctime/mtime in the same chunk */
- item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len);
+ /* we store CurFile, fname and ctime/mtime in the same chunk
+ * we need some extra bytes to handle an empty chksum
+ */
+ item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3);
item->seen = 0;
/* TODO: see if we can optimize this part with memcpy instead of strcpy */
goto bail_out;
}
- decode_stat(elt.lstat, &statc, &LinkFIc); /* decode catalog stat */
+ decode_stat(elt.lstat, &statc, sizeof(statc), &LinkFIc); /* decode catalog stat */
if (!jcr->rerunning && (jcr->getJobLevel() == L_FULL)) {
opts = ff_pkt->BaseJobOpts;
BSOCK *dir = jcr->dir_bsock;
int lstat_pos, chksum_pos;
int32_t nb;
- uint16_t delta_seq;
+ uint32_t delta_seq;
if (job_canceled(jcr)) {
return true;