BSOCK *fd;
int n = 0;
ATTR_DBR *ar = NULL;
+ char digest[MAXSTRING];
fd = jcr->file_bsock;
jcr->jr.FirstIndex = 1;
uint32_t file_index;
int stream, len;
char *p, *fn;
- char Opts_Digest[MAXSTRING]; /* either Verify opts or MD5/SHA1 digest */
- char digest[CRYPTO_DIGEST_MAX_SIZE];
+ char Digest[MAXSTRING]; /* either Verify opts or MD5/SHA1 digest */
jcr->fname = check_pool_memory_size(jcr->fname, fd->msglen);
- if ((len = sscanf(fd->msg, "%ld %d %s", &file_index, &stream, Opts_Digest)) != 3) {
+ if ((len = sscanf(fd->msg, "%ld %d %s", &file_index, &stream, Digest)) != 3) {
Jmsg(jcr, M_FATAL, 0, _("<filed: bad attributes, expected 3 fields got %d\n"
"msglen=%d msg=%s\n"), len, fd->msglen, fd->msg);
set_jcr_job_status(jcr, JS_ErrorTerminated);
stream_to_ascii(stream), file_index, jcr->FileIndex);
continue;
}
- db_escape_string(digest, Opts_Digest, strlen(Opts_Digest));
ar->Digest = digest;
ar->DigestType = crypto_digest_stream_type(stream);
- Dmsg3(dbglvl, "DigestLen=%d Digest=%s type=%d\n", strlen(digest), digest,
- ar->DigestType);
+ db_escape_string(digest, Digest, strlen(Digest));
+ Dmsg4(dbglvl, "stream=%d DigestLen=%d Digest=%s type=%d\n", stream,
+ strlen(digest), digest, ar->DigestType);
}
jcr->jr.JobFiles = jcr->JobFiles = file_index;
jcr->jr.LastIndex = file_index;
}
if (is_bnet_error(fd)) {
Jmsg1(jcr, M_FATAL, 0, _("<filed: Network error getting attributes. ERR=%s\n"),
- bnet_strerror(fd));
+ fd->bstrerror());
return 0;
}
if (jcr->cached_attribute) {