# HG changeset patch # User Sebastien Jodogne # Date 1444141997 -7200 # Node ID 7dae55228b1624c9aa30e433d460a22142aef736 # Parent ee4367497d0d5cbf255b2ce753146fc5a965baaf Fix issue 4 (C-Store Association not renegotiated on Specific-to-specific transfer syntax change) diff -r ee4367497d0d -r 7dae55228b16 NEWS --- a/NEWS Tue Oct 06 14:02:39 2015 +0200 +++ b/NEWS Tue Oct 06 16:33:17 2015 +0200 @@ -18,6 +18,7 @@ Maintenance ----------- +* Fix issue 4 (C-Store Association not renegotiated on Specific-to-specific transfer syntax change) * "/system" URI gives information about the plugins used for storage area and DB back-end * Plugin callbacks should now return explicit "OrthancPluginErrorCode" instead of integers * "/tools/create-dicom" can create tags with unknown VR diff -r ee4367497d0d -r 7dae55228b16 OrthancServer/DicomProtocol/DicomUserConnection.cpp --- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp Tue Oct 06 14:02:39 2015 +0200 +++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp Tue Oct 06 16:33:17 2015 +0200 @@ -272,10 +272,22 @@ const std::string syntax(xfer.getXferID()); bool isGeneric = IsGenericTransferSyntax(syntax); - if (isGeneric ^ IsGenericTransferSyntax(connection.GetPreferredTransferSyntax())) + bool renegociate; + if (isGeneric) { - // Making a generic-to-specific or specific-to-generic change of - // the transfer syntax. Renegotiate the connection. + // Are we making a generic-to-specific or specific-to-generic change of + // the transfer syntax? If this is the case, renegotiate the connection. + renegociate = !IsGenericTransferSyntax(connection.GetPreferredTransferSyntax()); + } + else + { + // We are using a specific transfer syntax. Renegociate if the + // current connection does not match this transfer syntax. + renegociate = (syntax != connection.GetPreferredTransferSyntax()); + } + + if (renegociate) + { LOG(INFO) << "Change in the transfer syntax: the C-Store associated must be renegotiated"; if (isGeneric)