Refactor association establishment and fix #589#677
Merged
Enet4 merged 6 commits intoEnet4:masterfrom Oct 1, 2025
Merged
Conversation
* Move sans-io logic to their own respective functions * Use shared logic for both sync and async implementations
* Error names changed, so need to update into other workspace crates
Merged
0b99fb7 to
773a44e
Compare
Enet4
approved these changes
Oct 1, 2025
Owner
Enet4
left a comment
There was a problem hiding this comment.
The small API changes in dicom_ul are acceptable. The new tests are sound and they are all passing. Building and running the various DIMSE tools they seem to be working as intended. And the rest of the code changes look OK at a few glances.
Great! With this one merged it should now be easier to wrap up for 0.9.0. Thanks once again! 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A lot of the logic in association establishment for both client/server is repeated in the sync/async methods. This PR attempts to extract any non-io logic into separate methods that can be shared between those methods.
In addition it also reduces duplication in
And finally, it adds tests that reproduce and confirm the fix for 589.
Full list of changes
Errorenums from Client/Server to one enum at the module levelNegotiatedOptionsstruct to represent values discovered duringassociation.
get_client_pduandget_client_pdu_asynctoread_pdu_from_wireand
read_pdu_from_wire_asyncand move to module levelso they can be refactored out of
establishand re-used for the sync and asyncmethods.
and re-used for the async implementation
read_pdu_from_wireandread_pdu_from_wire_asyncwhere possible