Reserved field get parsed/generated like any other bit/byte field

This commit is contained in:
Martin Willi
2011-01-05 16:45:51 +01:00
parent c93c7a7560
commit bf029696c6
2 changed files with 12 additions and 81 deletions
+2 -26
View File
@@ -409,6 +409,7 @@ static status_t parse_payload(private_parser_t *this,
break;
}
case U_INT_8:
case RESERVED_BYTE:
{
if (!parse_uint8(this, rule_number, output + rule->offset))
{
@@ -427,6 +428,7 @@ static status_t parse_payload(private_parser_t *this,
break;
}
case U_INT_32:
case HEADER_LENGTH:
{
if (!parse_uint32(this, rule_number, output + rule->offset))
{
@@ -445,23 +447,6 @@ static status_t parse_payload(private_parser_t *this,
break;
}
case RESERVED_BIT:
{
if (!parse_bit(this, rule_number, NULL))
{
pld->destroy(pld);
return PARSE_ERROR;
}
break;
}
case RESERVED_BYTE:
{
if (!parse_uint8(this, rule_number, NULL))
{
pld->destroy(pld);
return PARSE_ERROR;
}
break;
}
case FLAG:
{
if (!parse_bit(this, rule_number, output + rule->offset))
@@ -487,15 +472,6 @@ static status_t parse_payload(private_parser_t *this,
}
break;
}
case HEADER_LENGTH:
{
if (!parse_uint32(this, rule_number, output + rule->offset))
{
pld->destroy(pld);
return PARSE_ERROR;
}
break;
}
case SPI_SIZE:
{
if (!parse_uint8(this, rule_number, output + rule->offset))