sktutil: Use the Mandatory flag in parse_dataobj.

We need to look at the Mandatory flag and not at the Minimum flag
when parsing CTLVs.  The Minimum flag is important when encoding CTLVs
because CR bit is set according to it.
This commit is contained in:
Andrzej Zaborowski 2010-07-07 00:39:06 +02:00 committed by Denis Kenzior
parent 23c5f28569
commit c451994139
1 changed files with 3 additions and 3 deletions

View File

@ -2324,8 +2324,8 @@ static enum stk_command_parse_result parse_dataobj(
if (comprehension_tlv_iter_get_tag(iter) == entry->type)
break;
/* Can't skip over Minimum objects */
if (entry->flags & DATAOBJ_FLAG_MINIMUM) {
/* Can't skip over mandatory objects */
if (entry->flags & DATAOBJ_FLAG_MANDATORY) {
l2 = NULL;
break;
}
@ -2352,7 +2352,7 @@ static enum stk_command_parse_result parse_dataobj(
for (; l; l = l->next) {
struct dataobj_handler_entry *entry = l->data;
if (entry->flags & DATAOBJ_FLAG_MINIMUM)
if (entry->flags & DATAOBJ_FLAG_MANDATORY)
minimum_set = FALSE;
}