Skip to content

Commit

Permalink
Ignore tape labels in NDMP code.
Browse files Browse the repository at this point in the history
When we encounter some sort of tape label in the backup stream
(e.g. FileIndex < 0) then we should just skip that data and not
use the default handling which leads to an EOF. When we now encounter a
unknown data stream we also print an error including the number of the
unwanted datastream.
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent 71b89e4 commit bc34592
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/stored/ndmp_tape.c
Expand Up @@ -431,6 +431,13 @@ static inline bool bndmp_read_data_from_block(JCR *jcr,
}
}

/*
* See if we are processing some sort of label?
*/
if (rctx->rec->FileIndex < 0) {
continue;
}

/*
* Here we should have read a record from the block which contains some data.
* Its either:
Expand Down Expand Up @@ -460,6 +467,7 @@ static inline bool bndmp_read_data_from_block(JCR *jcr,
*data_length = 0;
return true;
default:
Jmsg1(jcr, M_ERROR, 0, _("Encountered an unknown stream type %d\n"), rctx->rec->maskedStream);
*data_length = 0;
return true;
}
Expand Down

0 comments on commit bc34592

Please sign in to comment.