ok = db_get_pool_record(jcr, jcr->db, &pr);
if (ok) {
mr.PoolId = pr.PoolId;
- if (jcr->store->StorageId) {
- mr.StorageId = jcr->store->StorageId;
- }
+ mr.StorageId = jcr->store->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);
}
/*
* Send Find Media response to Storage daemon
&jm.FirstIndex, &jm.LastIndex, &jm.StartFile, &jm.EndFile,
&jm.StartBlock, &jm.EndBlock, &jm.Copy, &jm.Stripe) == 9) {
- if (jcr->target_jcr) {
- jm.JobId = jcr->target_jcr->JobId;
+ if (jcr->previous_jcr) {
+ jm.JobId = jcr->previous_jcr->JobId;
jm.MediaId = jcr->MediaId;
} else {
jm.JobId = jcr->JobId;
ar->FileIndex = FileIndex;
ar->Stream = Stream;
ar->link = NULL;
- if (jcr->target_jcr) {
- ar->JobId = jcr->target_jcr->JobId;
+ if (jcr->previous_jcr) {
+ ar->JobId = jcr->previous_jcr->JobId;
} else {
ar->JobId = jcr->JobId;
}