Skip to content

Commit

Permalink
Merge pull request #552 from naterichman/presentation-context-id
Browse files Browse the repository at this point in the history
BUG: Use only odd presentation context IDs
  • Loading branch information
Enet4 authored Aug 6, 2024
2 parents 45c9ccd + 4c32e4b commit 334273d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ul/src/association/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ impl<'a> ClientAssociationOptions<'a> {
.into_iter()
.enumerate()
.map(|(i, presentation_context)| PresentationContextProposed {
id: (i + 1) as u8,
id: (2 * i + 1) as u8,
abstract_syntax: presentation_context.0.to_string(),
transfer_syntaxes: presentation_context
.1
Expand Down
2 changes: 1 addition & 1 deletion ul/tests/association_echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn spawn_scp() -> Result<(JoinHandle<Result<()>>, SocketAddr)> {
transfer_syntax: IMPLICIT_VR_LE.to_string(),
},
PresentationContextResult {
id: 2,
id: 3,
reason: PresentationContextResultReason::AbstractSyntaxNotSupported,
transfer_syntax: IMPLICIT_VR_LE.to_string(),
}
Expand Down
4 changes: 2 additions & 2 deletions ul/tests/association_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn spawn_scp() -> Result<(JoinHandle<Result<()>>, SocketAddr)> {
transfer_syntax: IMPLICIT_VR_LE.to_string(),
},
PresentationContextResult {
id: 2,
id: 3,
reason: PresentationContextResultReason::Acceptance,
transfer_syntax: JPEG_BASELINE.to_string(),
}
Expand Down Expand Up @@ -85,7 +85,7 @@ fn scu_scp_association_test() {
// guaranteed to be MR image storage
assert_eq!(pc.transfer_syntax, IMPLICIT_VR_LE);
}
2 => {
3 => {
// guaranteed to be MG image storage
assert_eq!(pc.transfer_syntax, JPEG_BASELINE);
}
Expand Down
4 changes: 2 additions & 2 deletions ul/tests/association_store_uncompressed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn spawn_scp() -> Result<(JoinHandle<Result<()>>, SocketAddr)> {
// should always pick Explicit VR LE
// because JPEG baseline was not explicitly enabled in SCP
PresentationContextResult {
id: 2,
id: 3,
reason: PresentationContextResultReason::Acceptance,
transfer_syntax: EXPLICIT_VR_LE.to_string(),
}
Expand Down Expand Up @@ -98,7 +98,7 @@ fn scu_scp_association_uncompressed() {
assert_eq!(pc.transfer_syntax, IMPLICIT_VR_LE);
}
// guaranteed to be MG image storage
2 => {
3 => {
// server picked this one because it did not accept JPEG baseline
assert_eq!(pc.transfer_syntax, EXPLICIT_VR_LE);
}
Expand Down

0 comments on commit 334273d

Please sign in to comment.