int retry = 0;
bool ok;
bool InChanger;
- STORE *store = jcr->store;
+ STORE *store = jcr->wstore;
bstrncpy(mr->MediaType, store->media_type, sizeof(mr->MediaType));
Dmsg2(100, "CatReq FindMedia: PoolId=%d, MediaType=%s\n", (int)mr->PoolId, mr->MediaType);
* 1. Look for volume with "Append" status.
*/
ok = db_find_next_volume(jcr, jcr->db, index, InChanger, mr);
- Dmsg2(100, "catreq after find_next_vol ok=%d FW=%d\n", ok, mr->FirstWritten);
+ Dmsg4(100, "after find_next_vol index=%d ok=%d InChanger=%d Vstat=%s\n",
+ index, ok, InChanger, mr->VolStatus);
if (!ok) {
/*
* 2. Try finding a recycled volume
*/
ok = find_recycled_volume(jcr, InChanger, mr);
- Dmsg2(100, "find_recycled_volume %d FW=%d\n", ok, mr->FirstWritten);
+ Dmsg2(100, "find_recycled_volume ok=%d FW=%d\n", ok, mr->FirstWritten);
if (!ok) {
/*
* 3. Try recycling any purged volume