# HG changeset patch # User Sebastien Jodogne # Date 1590130924 -7200 # Node ID fde1355a625ab5f6f9c93493adf6e837f46fd6a0 # Parent 7f296ae25039f20e4b5e462ccfa45e36ceeafc42 c-get compatibility with ginkgocadx diff -r 7f296ae25039 -r fde1355a625a OrthancServer/OrthancGetRequestHandler.cpp --- a/OrthancServer/OrthancGetRequestHandler.cpp Fri May 22 08:33:26 2020 +0200 +++ b/OrthancServer/OrthancGetRequestHandler.cpp Fri May 22 09:02:04 2020 +0200 @@ -159,19 +159,21 @@ LST_Position(l, (LST_NODE*)pc); while (pc) { + DicomTransferSyntax transferSyntax; if (pc->result == ASC_P_ACCEPTANCE && - std::string(pc->abstractSyntax) == sopClassUid) + LookupTransferSyntax(transferSyntax, pc->acceptedTransferSyntax)) { - DicomTransferSyntax transferSyntax; - if (LookupTransferSyntax(transferSyntax, pc->acceptedTransferSyntax)) + VLOG(0) << "C-GET SCP accepted: SOP class " << sopClassUid + << " with transfer syntax " << GetTransferSyntaxUid(transferSyntax); + if (std::string(pc->abstractSyntax) == sopClassUid) { accepted[transferSyntax] = pc->presentationContextID; } - else - { - LOG(WARNING) << "C-GET: Unknown transfer syntax received: " - << pc->acceptedTransferSyntax; - } + } + else + { + LOG(WARNING) << "C-GET: Unknown transfer syntax received: " + << pc->acceptedTransferSyntax; } pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); @@ -216,7 +218,7 @@ for (std::list::const_iterator it = preferred.begin(); it != preferred.end(); ++it) - { + { Accepted::const_iterator found = accepted.find(*it); if (found != accepted.end()) { @@ -266,12 +268,18 @@ } else { + LOG(INFO) << "C-GET SCP selected transfer syntax " << GetTransferSyntaxUid(selectedSyntax) + << ", for source instance with SOP class " << sopClassUid + << " and transfer syntax " << GetTransferSyntaxUid(sourceSyntax); + // make sure that we can send images in this presentation context T_ASC_PresentationContext pc; ASC_findAcceptedPresentationContext(assoc->params, presId, &pc); // the acceptedRole is the association requestor role - if ((pc.acceptedRole != ASC_SC_ROLE_SCP) && - (pc.acceptedRole != ASC_SC_ROLE_SCUSCP)) + + if (pc.acceptedRole != ASC_SC_ROLE_DEFAULT && // "DEFAULT" is necessary for GinkgoCADx + pc.acceptedRole != ASC_SC_ROLE_SCP && + pc.acceptedRole != ASC_SC_ROLE_SCUSCP) { // the role is not appropriate nFailed_++;