Skip to content

Support signed MMS FRSM IDs during file transfer#38

Merged
masarray merged 4 commits into
mainfrom
fix/signed-frsm-file-transfer
Jul 20, 2026
Merged

Support signed MMS FRSM IDs during file transfer#38
masarray merged 4 commits into
mainfrom
fix/signed-frsm-file-transfer

Conversation

@masarray

Copy link
Copy Markdown
Owner

Field evidence

Directory discovery is now correct, but Download selected still fails on a BCU endpoint after FileOpen/FileRead begins. The only surfaced first-chance exception is InvalidDataException.

Root cause addressed

ISO 9506 defines the FileOpen response frsmID as Integer32, not an unsigned value. The existing decoder rejected negative values and the FileRead/FileClose request builders also threw for any FRSM below zero. Several MMS servers allocate negative FRSM handles, so a valid FileOpen response was being converted into a failed transfer.

Changes

  • accept the complete signed Integer32 range returned as FRSM
  • echo the exact signed FRSM unchanged in FileRead and FileClose
  • replace the -1 sentinel with a nullable FRSM in the interoperable transfer path
  • add bundle download routing that preserves existing size limits, temporary-file cleanup, cancellation and progress behavior
  • include exact request/response hex in failed bundle diagnostics

Regression coverage

  • FileOpen response with FRSM -17 succeeds
  • FileRead and FileClose encode -1, -17, int.MinValue, and positive IDs correctly

The existing public transfer path is left intact; ARSAS opts into the compatibility path for field interoperability.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@masarray
masarray merged commit 389bfeb into main Jul 20, 2026
1 check passed
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.

1 participant