11use super :: { oneshot, AskPattern , Association , AssociationError , ChannelError , Command , Sender } ;
22use dicom:: transfer_syntax:: TransferSyntaxRegistry ;
3- use dicom:: ul:: { pdu:: PresentationContextResult , Pdu } ;
3+ use dicom:: ul:: pdu:: Pdu ;
4+ use dicom:: ul:: pdu:: PresentationContextNegotiated ;
45use std:: convert:: identity;
56use std:: io:: ErrorKind ;
67use std:: { net:: TcpStream , thread, time:: Duration } ;
@@ -11,7 +12,7 @@ use uuid::Uuid;
1112pub struct ServerAssociation {
1213 uuid : Uuid ,
1314 channel : Sender < Command > ,
14- presentation_contexts : Vec < PresentationContextResult > ,
15+ presentation_contexts : Vec < PresentationContextNegotiated > ,
1516 tcp_stream : TcpStream ,
1617}
1718
@@ -84,7 +85,7 @@ impl ServerAssociation {
8485 }
8586 Command :: Receive ( response) => {
8687 let receive_result =
87- association. receive ( ) . map_err ( AssociationError :: Server ) ;
88+ association. receive ( ) . map_err ( AssociationError :: Association ) ;
8889 response
8990 . send ( receive_result)
9091 . map_err ( |_value| ChannelError :: Closed )
@@ -101,7 +102,7 @@ impl ServerAssociation {
101102
102103 if let Err ( e) = association. abort ( ) {
103104 match e {
104- dicom:: ul:: association:: server :: Error :: WireSend { source, .. }
105+ dicom:: ul:: association:: Error :: WireSend { source, .. }
105106 if source. kind ( ) == ErrorKind :: BrokenPipe =>
106107 {
107108 // no-op, happens on MacOS if the TCP stream is already closed
@@ -153,7 +154,7 @@ impl Association for ServerAssociation {
153154 }
154155 }
155156
156- fn presentation_contexts ( & self ) -> & [ PresentationContextResult ] {
157+ fn presentation_contexts ( & self ) -> & [ PresentationContextNegotiated ] {
157158 & self . presentation_contexts
158159 }
159160}
0 commit comments