Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTEGER to 64-bit native integer methods #177

Merged
merged 2 commits into from
Feb 11, 2024

Conversation

v0-e
Copy link

@v0-e v0-e commented Feb 7, 2024

Adds INTEGER2int64() and INTEGER2uint64() functions, complementing the already implemented int642INTEGER() and uint642INTEGER().
Also adds tests to test all of the mentioned functions.

@acetcom
Copy link

acetcom commented Feb 9, 2024

@v0-e and @mouse07410

After applying this pull request and changing all asn_INTEGER2ulong() in Open5GS to asn_INTEGER2uint64(), all S1AP/NGAP Test Programs in Open5GS work well on 32bit/64bit.

Thank you so much!
Sukchan

@mouse07410 mouse07410 merged commit e0c4a3e into mouse07410:vlm_master Feb 11, 2024
1 check passed
acetcom added a commit to open5gs/open5gs that referenced this pull request Feb 12, 2024
APER encoding fails when using the asn_uint642INTEGER function on a 32-bit machine as shown below.

```C
   asn_uint642INTEGER(AMF_UE_NGAP_ID, 0xffffffff);
   ...
   aper_encode_to_buffer(...)
```

INTEGER APER encode/decode functions seem to be operating internally with long variables instead of intmax_t.
That is probably the reason of the failure.

@v0-e fixed this issues in the mouse07410/asn1c pull request.
mouse07410/asn1c#176
mouse07410/asn1c#177
acetcom added a commit to open5gs/open5gs that referenced this pull request Feb 12, 2024
APER encoding fails when using the asn_uint642INTEGER function on a 32-bit machine as shown below.

```C
   asn_uint642INTEGER(AMF_UE_NGAP_ID, 0xffffffff);
   ...
   aper_encode_to_buffer(...)
```

INTEGER APER encode/decode functions seem to be operating internally with long variables instead of intmax_t.
That is probably the reason of the failure.

@v0-e fixed this issues in the mouse07410/asn1c pull request.
mouse07410/asn1c#176
mouse07410/asn1c#177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants