input/csv: Skip header line.

This commit is contained in:
Jens Steinhauser 2014-10-19 19:53:08 +02:00 committed by Bert Vermeulen
parent c3eadb0760
commit 160691b900
1 changed files with 7 additions and 0 deletions

View File

@ -667,6 +667,13 @@ static int process_buffer(struct sr_input *in)
continue; continue;
} }
/* Skip the header line, its content was used as the channel names. */
if (inc->header) {
sr_spew("Header line %zu skipped.", inc->line_number);
inc->header = FALSE;
continue;
}
if (!(columns = parse_line(lines[l], inc, max_columns))) { if (!(columns = parse_line(lines[l], inc, max_columns))) {
sr_err("Error while parsing line %zu.", inc->line_number); sr_err("Error while parsing line %zu.", inc->line_number);
return SR_ERR; return SR_ERR;