ok = db_get_pool_record(jcr, jcr->db, &pr);
if (ok) {
mr.PoolId = pr.PoolId;
- mr.StorageId = jcr->store->StorageId;
+ mr.StorageId = jcr->wstore->StorageId;
ok = find_next_volume_for_append(jcr, &mr, index, true /*permit create new vol*/);
Dmsg3(100, "find_media idx=%d ok=%d vol=%s\n", index, ok, mr.VolumeName);
}
*/
if (mr.PoolId != jcr->jr.PoolId) {
reason = _("not in Pool");
- } else if (strcmp(mr.MediaType, jcr->store->media_type) != 0) {
+ } else if (strcmp(mr.MediaType, jcr->wstore->media_type) != 0) {
reason = _("not correct MediaType");
} else {
/*
mr.VolWriteTime = sdmr.VolWriteTime;
mr.VolParts = sdmr.VolParts;
bstrncpy(mr.VolStatus, sdmr.VolStatus, sizeof(mr.VolStatus));
- if (jcr->store->StorageId) {
- mr.StorageId = jcr->store->StorageId;
+ if (jcr->wstore->StorageId) {
+ mr.StorageId = jcr->wstore->StorageId;
}
Dmsg2(400, "db_update_media_record. Stat=%s Vol=%s\n", mr.VolStatus, mr.VolumeName);
&jm.FirstIndex, &jm.LastIndex, &jm.StartFile, &jm.EndFile,
&jm.StartBlock, &jm.EndBlock, &jm.Copy, &Stripe) == 9) {
- if (jcr->previous_jcr) {
- jm.JobId = jcr->previous_jcr->JobId;
+ if (jcr->mig_jcr) {
+ jm.JobId = jcr->mig_jcr->JobId;
jm.MediaId = jcr->MediaId;
} else {
jm.JobId = jcr->JobId;
ar->FileIndex = FileIndex;
ar->Stream = Stream;
ar->link = NULL;
- if (jcr->previous_jcr) {
- ar->JobId = jcr->previous_jcr->JobId;
+ if (jcr->mig_jcr) {
+ ar->JobId = jcr->mig_jcr->JobId;
} else {
ar->JobId = jcr->JobId;
}
Stream);
}
- bin_to_base64(digestbuf, fname, len);
+ bin_to_base64(digestbuf, sizeof(digestbuf), fname, len, true);
Dmsg3(400, "DigestLen=%d Digest=%s type=%d\n", strlen(digestbuf), digestbuf, Stream);
if (jcr->cached_attribute) {
ar->Digest = digestbuf;