Skip to content

Commit 479ecb7

Browse files
authored
Merge pull request #66 from UMEssen/fix-storescp-pctx
Fix wrong transfer syntax recorded in file meta
2 parents 3d40223 + d7fb22d commit 479ecb7

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
single request (e.g. for every instance of a STOW-RS request).
1919
- Associations are no longer returned to the pool after a failed or partially completed message
2020
exchange, as their state is unknown.
21+
- Fix incorrect transfer syntax recorded in file meta when multiple presentation contexts were negotiated in STORE-SCP.
2122

2223
## Changed
2324

‎src/backend/dimse/cstore/storescp.rs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ impl StoreServiceClassProvider {
9292

9393
// Duration::MAX to indefinitely wait for incoming messages
9494
while let Ok(message) = association.read_message(Duration::MAX).await {
95+
let pctx_id = message
96+
.presentation_context_id
97+
.context("Missing presentation context id in received message")?;
9598
let pctx = association
9699
.presentation_contexts()
97-
.first()
98-
.context("No presentation context available")?;
100+
.iter()
101+
.find(|pctx| pctx.id == pctx_id)
102+
.context("No negotiated presentation context matches the received message")?;
99103
debug!(
100104
"Used transfer syntax {} to read message",
101105
pctx.transfer_syntax

0 commit comments

Comments
 (0)