Skip to content

Commit

Permalink
Hard-coded fix for TimestampIts field constraint check for Craton (un…
Browse files Browse the repository at this point in the history
…til there is a better solution_
  • Loading branch information
khevessy committed Nov 15, 2024
1 parent f8d1204 commit 7ebd804
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vanetza/asn1/its/TimestampIts.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int
TimestampIts_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const INTEGER_t *st = (const INTEGER_t *)sptr;
long value;
uint64_t value;

if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
Expand All @@ -20,7 +20,7 @@ TimestampIts_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
return -1;
}

if(asn_INTEGER2long(st, &value)) {
if(asn_INTEGER2uint64(st, &value)) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value too large (%s:%d)",
td->name, __FILE__, __LINE__);
Expand Down
4 changes: 2 additions & 2 deletions vanetza/asn1/its/r2/TimestampIts.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int
Vanetza_ITS2_TimestampIts_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const INTEGER_t *st = (const INTEGER_t *)sptr;
long value;
uint64_t value;

if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
Expand All @@ -20,7 +20,7 @@ Vanetza_ITS2_TimestampIts_constraint(const asn_TYPE_descriptor_t *td, const void
return -1;
}

if(asn_INTEGER2long(st, &value)) {
if(asn_INTEGER2uint64(st, &value)) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value too large (%s:%d)",
td->name, __FILE__, __LINE__);
Expand Down

0 comments on commit 7ebd804

Please sign in to comment.