Commit 7ef83a45 authored by Lev Walkin's avatar Lev Walkin

deeper validation

parent fc776437
......@@ -1067,7 +1067,7 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
OUT("td->elements_count = asn_DEF_%s.elements_count;\n", type_name);
if(etd_spec != ETD_NO_SPECIFICS) {
INDENT(-1);
OUT(" /* ");
OUT(" /* ");
}
OUT("td->specifics = asn_DEF_%s.specifics;", type_name);
if(etd_spec == ETD_NO_SPECIFICS) {
......
......@@ -170,8 +170,17 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
INDENT(-1);
OUT(") {\n");
INDENT(+1);
OUT("/* Constraint check succeeded */\n");
OUT("return 0;\n");
switch(etype) {
case ASN_CONSTR_SEQUENCE_OF:
OUT("/* SEQUENCE validation code is the same as SET */\n");
case ASN_CONSTR_SET_OF:
OUT("/* Perform validation of the inner elements */\n");
OUT("return SET_OF_constraint(td, list, app_errlog, app_key);\n");
break;
default:
OUT("/* Constraint check succeeded */\n");
OUT("return 0;\n");
}
INDENT(-1);
OUT("} else {\n");
INDENT(+1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment