diff --git a/ChangeLog b/ChangeLog index 6c7e05a3b3fb9e026dba3ecfcf2194b73a3ab909..0292a99946e3324ff2b9028822ea28c14fff8912 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ * -t option added to asn1c to ease manual BER/CER/DER decoding. * Added support COMPONENTS OF construct. * Numerous parser fixes and enhancements. + * Better constraint failure reporting. 0.8.19: 2004-Aug-18 diff --git a/libasn1compiler/asn1c_constraint.c b/libasn1compiler/asn1c_constraint.c index dcbd50b3d0bdaefc6aeb987c716370031238da75..36b27758650d76a126ac53eb4d47eaa8d8fd3e5f 100644 --- a/libasn1compiler/asn1c_constraint.c +++ b/libasn1compiler/asn1c_constraint.c @@ -109,7 +109,8 @@ asn1c_emit_constraint_checking_code(arg_t *arg) { OUT("if(!sptr) {\n"); INDENT(+1); OUT("_ASN_ERRLOG(app_errlog, app_key,\n"); - OUT("\t\"%%s: value not given\", td->name);\n"); + OUT("\t\"%%s: value not given (%%s:%%d)\",\n"); + OUT("\ttd->name, __FILE__, __LINE__);\n"); OUT("return -1;\n"); INDENT(-1); OUT("}\n"); @@ -173,7 +174,8 @@ asn1c_emit_constraint_checking_code(arg_t *arg) { OUT("} else {\n"); INDENT(+1); OUT("_ASN_ERRLOG(app_errlog, app_key,\n"); - OUT("\t\"%%s: constraint failed\", td->name);\n"); + OUT("\t\"%%s: constraint failed (%%s:%%d)\",\n"); + OUT("\ttd->name, __FILE__, __LINE__);\n"); OUT("return -1;\n"); INDENT(-1); OUT("}\n"); @@ -542,7 +544,8 @@ emit_value_determination_code(arg_t *arg, asn1p_expr_type_e etype) { OUT("if(asn1_INTEGER2long(st, &value)) {\n"); INDENT(+1); OUT("_ASN_ERRLOG(app_errlog, app_key,\n"); - OUT("\t\"%%s: value too large\", td->name);\n"); + OUT("\t\"%%s: value too large (%%s:%%d)\",\n"); + OUT("\ttd->name, __FILE__, __LINE__);\n"); OUT("return -1;\n"); INDENT(-1); OUT("}\n"); diff --git a/skeletons/BIT_STRING.c b/skeletons/BIT_STRING.c index df11c19cf93f00a899982ad88e3ae6ac0213a843..bca34732dcb0b1e8ce90d985c82a5fba4509915a 100644 --- a/skeletons/BIT_STRING.c +++ b/skeletons/BIT_STRING.c @@ -39,18 +39,20 @@ BIT_STRING_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(st->size) { if(st->size == 1 && st->buf[0] != 0) { _ASN_ERRLOG(app_errlog, app_key, - "%s: invalid padding byte", - td->name); + "%s: invalid padding byte (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: no padding byte", td->name); + "%s: no padding byte (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c index 25f2bb6e371e8efe5464b7488320ce4b4cae4888..1da113b019a4a9507f0b7c5261a36e0fc74fb515 100644 --- a/skeletons/GeneralizedTime.c +++ b/skeletons/GeneralizedTime.c @@ -107,8 +107,8 @@ GeneralizedTime_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, tloc = asn_GT2time(st, 0, 0); if(tloc == -1 && errno != EPERM) { _ASN_ERRLOG(app_errlog, app_key, - "%s: Invalid time format: %s", - td->name, strerror(errno)); + "%s: Invalid time format: %s (%s:%d)", + td->name, strerror(errno), __FILE__, __LINE__); return -1; } diff --git a/skeletons/IA5String.c b/skeletons/IA5String.c index a44a9d0f83fc2ebcf6ffd3d6e9880b6badf92c11..e3ae82fe2c61b5da75e0061a2ac8e7ab7d80f3e8 100644 --- a/skeletons/IA5String.c +++ b/skeletons/IA5String.c @@ -43,17 +43,18 @@ IA5String_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(*buf > 0x7F) { _ASN_ERRLOG(app_errlog, app_key, "%s: value byte %d out of range: " - "%d > 127", + "%d > 127 (%s:%d)", td->name, (buf - st->buf) + 1, - *buf - ); + *buf, + __FILE__, __LINE__); return -1; } } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/NumericString.c b/skeletons/NumericString.c index 6c8729ff825e94f81a0f353dfb73c44dea7de1f5..aba1c72b8becbf8435e814c21c4f5bd5d616656f 100644 --- a/skeletons/NumericString.c +++ b/skeletons/NumericString.c @@ -48,17 +48,18 @@ NumericString_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, continue; } _ASN_ERRLOG(app_errlog, app_key, - "%s: value byte %d " - "not in NumericString alphabet (%d)", + "%s: value byte %d (%d) " + "not in NumericString alphabet (%s:%d)", td->name, (buf - st->buf) + 1, - *buf - ); + *buf, + __FILE__, __LINE__); return -1; } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/OBJECT_IDENTIFIER.c b/skeletons/OBJECT_IDENTIFIER.c index 063ae978e295346afd61af4e4de8c0d7f81f70f5..46191bc64b1150a5e65e40808fabbb96719ef1e5 100644 --- a/skeletons/OBJECT_IDENTIFIER.c +++ b/skeletons/OBJECT_IDENTIFIER.c @@ -81,13 +81,15 @@ OBJECT_IDENTIFIER_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(st && st->buf) { if(st->size < 1) { _ASN_ERRLOG(app_errlog, app_key, - "%s: at least one numerical value expected", - td->name); + "%s: at least one numerical value " + "expected (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/PrintableString.c b/skeletons/PrintableString.c index 8f67eddf4a73a12fbde53818e8df04f73e286f54..17be2aed800ab1893b87ab9bdfe54e95e2ccb505 100644 --- a/skeletons/PrintableString.c +++ b/skeletons/PrintableString.c @@ -66,18 +66,20 @@ PrintableString_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, for(; buf < end; buf++) { if(!_PrintableString_alphabet[*buf]) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value byte %d " - "not in PrintableString alphabet (%d)", + "%s: value byte %d (%d) " + "not in PrintableString alphabet " + "(%s:%d)", td->name, (buf - st->buf) + 1, *buf - ); + __FILE__, __LINE__); return -1; } } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/UTCTime.c b/skeletons/UTCTime.c index 8b7972c01198b65d9ff8cd8d673a3bc560e179f0..b2ca1a66f1d9254d5ae61102285849099da49deb 100644 --- a/skeletons/UTCTime.c +++ b/skeletons/UTCTime.c @@ -48,8 +48,8 @@ UTCTime_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, tloc = asn_UT2time(st, 0, 0); if(tloc == -1 && errno != EPERM) { _ASN_ERRLOG(app_errlog, app_key, - "%s: Invalid time format: %s", - td->name, strerror(errno)); + "%s: Invalid time format: %s (%s:%d)", + td->name, strerror(errno), __FILE__, __LINE__); return -1; } diff --git a/skeletons/UTF8String.c b/skeletons/UTF8String.c index aab4a2e951b0200cfcd0f48f6c4fac7211184850..c96c71a4e9c2068855f4fff5cc63770b8f5aa4cc 100644 --- a/skeletons/UTF8String.c +++ b/skeletons/UTF8String.c @@ -63,9 +63,10 @@ UTF8String_length(const UTF8String_t *st, const char *opt_type_name, if(w) { _ASN_ERRLOG(app_errlog, app_key, "%s: UTF-8 expectation " - "failed at byte %d", + "failed at byte %d (%s:%d)", opt_type_name, - (buf - st->buf) + 1); + (buf - st->buf) + 1, + __FILE__, __LINE__); return -1; } want--; @@ -79,9 +80,10 @@ UTF8String_length(const UTF8String_t *st, const char *opt_type_name, case 0: _ASN_ERRLOG(app_errlog, app_key, "%s: UTF-8 expectation" - "failed at byte %d", + "failed at byte %d (%s:%d)", opt_type_name, - (buf - st->buf) + 1); + (buf - st->buf) + 1, + __FILE__, __LINE__); return -1; } want = w - 1; /* Expect this much */ @@ -92,8 +94,8 @@ UTF8String_length(const UTF8String_t *st, const char *opt_type_name, /* If still want something, then something is wrong */ if(want) { _ASN_ERRLOG(app_errlog, app_key, - "%s: truncated UTF-8 sequence", - opt_type_name); + "%s: truncated UTF-8 sequence (%s:%d)", + opt_type_name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/VisibleString.c b/skeletons/VisibleString.c index aa9c99b1894a52e66da6f23612f5bab8b5c5dd51..d1a11dbef150ff32f2e5076cf7bf9cae3e2b3bf7 100644 --- a/skeletons/VisibleString.c +++ b/skeletons/VisibleString.c @@ -66,18 +66,19 @@ VisibleString_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, for(; buf < end; buf++) { if(!_VisibleString_alphabet[*buf]) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value byte %d " - "not in VisibleString alphabet (%d)", + "%s: value byte %d (%d) " + "not in VisibleString alphabet (%s:%d)", td->name, (buf - st->buf) + 1, - *buf - ); + *buf, + __FILE__, __LINE__); return -1; } } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c index 1f863feb4daf76b095cfd93e03ce28eebaccc91f..4ac71a64e4acd7f3bd2d98763409bf5428d62fb5 100644 --- a/skeletons/constr_CHOICE.c +++ b/skeletons/constr_CHOICE.c @@ -481,7 +481,8 @@ CHOICE_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -515,7 +516,8 @@ CHOICE_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, } } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: no CHOICE element given", td->name); + "%s: no CHOICE element given", + td->name, __FILE__, __LINE__); return -1; } } diff --git a/skeletons/constr_SEQUENCE.c b/skeletons/constr_SEQUENCE.c index 06ef4e83c3a6717fed9c1400bd87e000f073cf03..87d5ab660bc5d983a542ea7083bfd2513d61e0a1 100644 --- a/skeletons/constr_SEQUENCE.c +++ b/skeletons/constr_SEQUENCE.c @@ -644,7 +644,8 @@ SEQUENCE_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/skeletons/constr_SET.c b/skeletons/constr_SET.c index d1a81beba9df2c63d0dbdc74f92cd25897f4c212..ba42a4ffa97f4f1372706f2ff8d6f94488420f3e 100644 --- a/skeletons/constr_SET.c +++ b/skeletons/constr_SET.c @@ -659,7 +659,8 @@ SET_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -677,8 +678,9 @@ SET_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, &(specs->_mandatory_elements), edx)) { _ASN_ERRLOG(app_errlog, app_key, "%s: mandatory element " - "%s absent", - td->name, elm->name); + "%s absent (%s:%d)", + td->name, elm->name, + __FILE__, __LINE__); return -1; } continue; diff --git a/skeletons/constr_SET_OF.c b/skeletons/constr_SET_OF.c index ecf16f02ff543f9e70a80bcac668a60186b8adcd..e0c898da71882e0271491d4d1197f133df849250 100644 --- a/skeletons/constr_SET_OF.c +++ b/skeletons/constr_SET_OF.c @@ -518,7 +518,8 @@ SET_OF_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } diff --git a/tests/19-param-OK.asn1.-P b/tests/19-param-OK.asn1.-P index b98d1ed9ac1d6d4c947498145dc50ab72d2ad772..c40c439cce29a6420a05f5185acc9ebb53fe078e 100644 --- a/tests/19-param-OK.asn1.-P +++ b/tests/19-param-OK.asn1.-P @@ -261,7 +261,8 @@ memb_IA5String_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -271,7 +272,8 @@ memb_IA5String_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } diff --git a/tests/42-real-life-OK.asn1.-PR b/tests/42-real-life-OK.asn1.-PR index a934fff1b79a4708fd196dc5fdf523261ac55c66..ad954aa045597e4a6853e1b61c08abb5412ef982 100644 --- a/tests/42-real-life-OK.asn1.-PR +++ b/tests/42-real-life-OK.asn1.-PR @@ -40,7 +40,8 @@ memb_varsets_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -55,7 +56,8 @@ memb_varsets_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -187,7 +189,8 @@ memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -347,7 +350,8 @@ memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -362,7 +366,8 @@ memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } diff --git a/tests/50-constraint-OK.asn1.-P b/tests/50-constraint-OK.asn1.-P index 757b1d667fdf7b3be9c90be4d93f0352b6b0a705..059f64e36f41b3c674f058099d96e40677258d4a 100644 --- a/tests/50-constraint-OK.asn1.-P +++ b/tests/50-constraint-OK.asn1.-P @@ -128,13 +128,15 @@ Int2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } if(asn1_INTEGER2long(st, &value)) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value too large", td->name); + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -143,7 +145,8 @@ Int2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -247,13 +250,15 @@ Int3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } if(asn1_INTEGER2long(st, &value)) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value too large", td->name); + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -262,7 +267,8 @@ Int3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -365,7 +371,8 @@ Int4_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -479,13 +486,15 @@ Int5_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } if(asn1_INTEGER2long(st, &value)) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value too large", td->name); + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -494,7 +503,8 @@ Int5_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -597,7 +607,8 @@ ExtensibleExtensions_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -827,7 +838,8 @@ Str2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -839,7 +851,8 @@ Str2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -970,7 +983,8 @@ Str3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -982,7 +996,8 @@ Str3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -1101,7 +1116,8 @@ PER_Visible_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1111,7 +1127,8 @@ PER_Visible_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -1230,7 +1247,8 @@ PER_Visible_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1240,7 +1258,8 @@ PER_Visible_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -1359,7 +1378,8 @@ Not_PER_Visible_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1369,7 +1389,8 @@ Not_PER_Visible_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -1472,7 +1493,8 @@ Not_PER_Visible_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1585,7 +1607,8 @@ Not_PER_Visible_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1715,7 +1738,8 @@ SIZE_but_not_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1727,7 +1751,8 @@ SIZE_but_not_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -1847,7 +1872,8 @@ SIZE_and_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1859,7 +1885,8 @@ SIZE_and_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -1978,7 +2005,8 @@ Neither_SIZE_nor_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -1988,7 +2016,8 @@ Neither_SIZE_nor_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -2121,7 +2150,8 @@ Utf8_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -2134,7 +2164,8 @@ Utf8_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } } @@ -2238,7 +2269,8 @@ Utf8_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, - "%s: value not given", td->name); + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } @@ -2250,7 +2282,8 @@ Utf8_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, return 0; } else { _ASN_ERRLOG(app_errlog, app_key, - "%s: constraint failed", td->name); + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); return -1; } }