Return the abstract syntax in the presentation_contexts() method#687
Merged
Enet4 merged 2 commits intoEnet4:masterfrom Sep 25, 2025
Merged
Return the abstract syntax in the presentation_contexts() method#687Enet4 merged 2 commits intoEnet4:masterfrom
Enet4 merged 2 commits intoEnet4:masterfrom
Conversation
This is a breaking change. The presentation_contexts() method now returns a vector of a new PresentationContextNegotiated struct which includes all fields that were in PresentationContextResult, plus a new abstract_syntax String field, and the old PresentationContextResult stays for messaging only. The client can no longer return presentation context entries sent by a broken server that include an ID that was not among the ones proposed.
Owner
|
This looks rather sound and not too complicated, so I would say it's fine to enter in 0.9.0. |
Enet4
approved these changes
Sep 25, 2025
Owner
Enet4
left a comment
There was a problem hiding this comment.
I will go ahead and merge, getting us closer to 0.9.0. Thanks! 👍
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.
This is finally a fix for #683 that I'm comfortable with. The only problem is that it's a breaking change.
The return type of presentation_contexts() is now
&[PresentationContextNegotiated], and includes the abstract syntax that was negotiated on each PC. The PresentationContextResult struct remains for protocol handling. This avoids kludges such as using None for the field during internal handling, or adding another separate vector to relate abstract syntax and PC ID.A broken (or rogue) server may return PC IDs that are not in the list of PCs proposed by the client. These are now filtered out, as it would be impossible to assign an abstract syntax to them.
This adds a description in the docs to PresentationContextResult, while on it.
Fixes #683.