[BitBucket user: Alex Rothberg]
[BitBucket date: 2015-09-18.15:08:23]
This code does not seem to deal with the case where the needed TransferSyntax goes from one specific instance to another:
```
#!c++
// Determine whether a new presentation context must be
// negotiated, depending on the transfer syntax of this instance
DcmXfer xfer(dcmff.getDataset()->getOriginalXfer());
const std::string syntax(xfer.getXferID());
bool isGeneric = IsGenericTransferSyntax(syntax);
if (isGeneric ^ IsGenericTransferSyntax(connection.GetPreferredTransferSyntax()))
{
// Making a generic-to-specific or specific-to-generic change of
// the transfer syntax. Renegotiate the connection.
LOG(INFO) << "Change in the transfer syntax: the C-Store associated must be renegotiated";
if (isGeneric)
{
connection.ResetPreferredTransferSyntax();
}
else
{
connection.SetPreferredTransferSyntax(syntax);
}
}
``` |