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.
---
 src/stkutil.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index e92add3..d2cd126 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -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;
        }
 
-- 
1.7.1.86.g0e460.dirty

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to