mirror of https://gerrit.osmocom.org/asn1c
treat references to object identifier differently
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@267 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
45fce80dbb
commit
59f89da36c
|
@ -32,7 +32,7 @@ asn1f_fix_dereference_values(arg_t *arg) {
|
|||
r_value = -1;
|
||||
}
|
||||
|
||||
if(expr->value->type != ATV_INTEGER) {
|
||||
if(0 && expr->value->type != ATV_INTEGER) {
|
||||
FATAL(
|
||||
"INTEGER value %s at line %d: "
|
||||
"Incompatible value specified: %s",
|
||||
|
|
|
@ -22,7 +22,7 @@ asn1f_value_resolve(arg_t *arg, asn1p_expr_t *expr) {
|
|||
type_expr = asn1f_find_terminal_type(arg, expr);
|
||||
DEBUG("%s(): terminal type %p", __func__, type_expr);
|
||||
if(type_expr == 0) {
|
||||
DEBUG("\tTerminal type for %s not found", expr->Identifier);
|
||||
FATAL("Terminal type for is %s not found", expr->Identifier);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -64,10 +64,26 @@ asn1f_value_resolve(arg_t *arg, asn1p_expr_t *expr) {
|
|||
*/
|
||||
ret = asn1f_check_type_compatibility(arg, type_expr, val_type_expr);
|
||||
if(ret == -1) {
|
||||
DEBUG("\tIncompatible type of %s at %d with %s at %d",
|
||||
switch(type_expr->expr_type) {
|
||||
case ASN_BASIC_INTEGER:
|
||||
case ASN_BASIC_ENUMERATED:
|
||||
FATAL("Incompatible type of %s at %d with %s at %d",
|
||||
type_expr->Identifier, type_expr->_lineno,
|
||||
val_type_expr->Identifier, val_type_expr->_lineno);
|
||||
return -1;
|
||||
return -1;
|
||||
case ASN_BASIC_OBJECT_IDENTIFIER:
|
||||
/*
|
||||
* Ignore this for now.
|
||||
* We can't deal with OIDs inheritance properly yet.
|
||||
*/
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
WARNING("\tIncompatible type of %s at %d with %s at %d",
|
||||
type_expr->Identifier, type_expr->_lineno,
|
||||
val_type_expr->Identifier, val_type_expr->_lineno);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(asn1f_look_value_in_type(arg, val_type_expr, expr) == -1)
|
||||
|
|
Loading…
Reference in New Issue