* Version $Id$
*/
/*
- Copyright (C) 2002-2005 Kern Sibbald
+ Copyright (C) 2002-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Dmsg2(300, "No nxt_bsr use_pos=%d repos=%d\n", root_bsr->use_positioning, root_bsr->reposition);
return NULL;
}
- Dmsg2(100, "use_pos=%d repos=%d\n", root_bsr->use_positioning, root_bsr->reposition);
+ Dmsg2(300, "use_pos=%d repos=%d\n", root_bsr->use_positioning, root_bsr->reposition);
root_bsr->mount_next_volume = false;
for (bsr=root_bsr; bsr; bsr=bsr->next) {
if (bsr->done || !match_volume(bsr, bsr->volume, &dev->VolHdr, 1)) {
}
/*
- * Called to tell the matcher that the end of
- * the current file has been reached.
+ * Called after the signature record so that
+ * we can see if the current bsr has been
+ * fully processed (i.e. is done).
* The bsr argument is not used, but is included
* for consistency with the other match calls.
*
* Returns: true if we should reposition
* : false otherwise.
*/
-bool match_set_eof(BSR *bsr, DEV_RECORD *rec)
+bool is_this_bsr_done(BSR *bsr, DEV_RECORD *rec)
{
BSR *rbsr = rec->bsr;
- Dmsg1(100, "match_set %d\n", rbsr != NULL);
+ Dmsg1(300, "match_set %d\n", rbsr != NULL);
if (!rbsr) {
return false;
}
if (rbsr->count && rbsr->found >= rbsr->count) {
rbsr->done = true;
rbsr->root->reposition = true;
- Dmsg2(100, "match_set_eof reposition count=%d found=%d\n",
+ Dmsg2(500, "is_end_this_bsr set reposition=1 count=%d found=%d\n",
rbsr->count, rbsr->found);
return true;
}
SESSION_LABEL *sessrec, bool done)
{
if (bsr->done) {
+ Dmsg0(300, "bsr->done set\n");
goto no_match;
}
if (!match_volume(bsr, bsr->volume, volrec, 1)) {
+ Dmsg2(300, "bsr vol=%s != rec vol=%s\n", bsr->volume, volrec);
goto no_match;
}
if (!match_volfile(bsr, bsr->volfile, rec, 1)) {
- Dmsg2(100, "Fail on file. bsr=%d rec=%d\n", bsr->volfile->efile,
+ Dmsg2(300, "Fail on file. bsr=%d rec=%d\n", bsr->volfile->efile,
rec->File);
goto no_match;
}
if (!match_sesstime(bsr, bsr->sesstime, rec, 1)) {
- Dmsg2(100, "Fail on sesstime. bsr=%d rec=%d\n",
+ Dmsg2(300, "Fail on sesstime. bsr=%d rec=%d\n",
bsr->sesstime->sesstime, rec->VolSessionTime);
goto no_match;
}
/* NOTE!! This test MUST come after the sesstime test */
if (!match_sessid(bsr, bsr->sessid, rec)) {
- Dmsg2(100, "Fail on sessid. bsr=%d rec=%d\n",
+ Dmsg2(300, "Fail on sessid. bsr=%d rec=%d\n",
bsr->sessid->sessid, rec->VolSessionId);
goto no_match;
}
* the rec->bsr = bsr optimization above.
*/
if (!match_jobid(bsr, bsr->JobId, sessrec, 1)) {
+ Dmsg0(300, "fail on JobId\n");
goto no_match;
}
if (!match_job(bsr, bsr->job, sessrec, 1)) {
+ Dmsg0(300, "fail on Job\n");
goto no_match;
}
if (!match_client(bsr, bsr->client, sessrec, 1)) {
+ Dmsg0(300, "fail on Client\n");
goto no_match;
}
if (!match_job_type(bsr, bsr->JobType, sessrec, 1)) {
+ Dmsg0(300, "fail on Job type\n");
goto no_match;
}
if (!match_job_level(bsr, bsr->JobLevel, sessrec, 1)) {
+ Dmsg0(300, "fail on Job level\n");
goto no_match;
}
if (!match_stream(bsr, bsr->stream, rec, 1)) {
+ Dmsg0(300, "fail on stream\n");
goto no_match;
}
return 1;
if (!(rec->state & REC_ISTAPE)) {
return 1; /* All File records OK for this match */
}
-// Dmsg3(100, "match_volfile: sfile=%d efile=%d recfile=%d\n",
+// Dmsg3(300, "match_volfile: sfile=%d efile=%d recfile=%d\n",
// volfile->sfile, volfile->efile, rec->File);
if (volfile->sfile <= rec->File && volfile->efile >= rec->File) {
return 1;
if (volfile->done && done) {
bsr->done = true;
bsr->root->reposition = true;
- Dmsg2(100, "bsr done from volfile rec=%d volefile=%d\n",
+ Dmsg2(300, "bsr done from volfile rec=%d volefile=%d\n",
rec->File, volfile->efile);
}
return 0;
if (sesstime->done && done) {
bsr->done = true;
bsr->root->reposition = true;
- Dmsg0(100, "bsr done from sesstime\n");
+ Dmsg0(300, "bsr done from sesstime\n");
}
return 0;
}
if (findex->done && done) {
bsr->done = true;
bsr->root->reposition = true;
- Dmsg1(100, "bsr done from findex %d\n", rec->FileIndex);
+ Dmsg1(300, "bsr done from findex %d\n", rec->FileIndex);
}
return 0;
}