changeset 4669:b14989f9ff8b

fix misleading log message about unknown transfer syntax in C-GET SCP
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 28 May 2021 11:40:47 +0200
parents 9210e196cd98
children b12faca76a52
files OrthancServer/Sources/OrthancGetRequestHandler.cpp
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancGetRequestHandler.cpp	Fri May 28 11:37:26 2021 +0200
+++ b/OrthancServer/Sources/OrthancGetRequestHandler.cpp	Fri May 28 11:40:47 2021 +0200
@@ -148,20 +148,22 @@
       while (pc)
       {
         DicomTransferSyntax transferSyntax;
-        if (pc->result == ASC_P_ACCEPTANCE &&
-            LookupTransferSyntax(transferSyntax, pc->acceptedTransferSyntax))
+        if (pc->result == ASC_P_ACCEPTANCE)
         {
-          /*CLOG(TRACE, DICOM) << "C-GET SCP accepted: SOP class " << pc->abstractSyntax
-            << " with transfer syntax " << GetTransferSyntaxUid(transferSyntax);*/
-          if (std::string(pc->abstractSyntax) == sopClassUid)
+          if (LookupTransferSyntax(transferSyntax, pc->acceptedTransferSyntax))
           {
-            accepted[transferSyntax] = pc->presentationContextID;
+            /*CLOG(TRACE, DICOM) << "C-GET SCP accepted: SOP class " << pc->abstractSyntax
+              << " with transfer syntax " << GetTransferSyntaxUid(transferSyntax);*/
+            if (std::string(pc->abstractSyntax) == sopClassUid)
+            {
+              accepted[transferSyntax] = pc->presentationContextID;
+            }
           }
-        }
-        else
-        {
-          CLOG(WARNING, DICOM) << "C-GET: Unknown transfer syntax received: "
-                               << pc->acceptedTransferSyntax;
+          else
+          {
+            CLOG(WARNING, DICOM) << "C-GET: Unknown transfer syntax received: "
+                                 << pc->acceptedTransferSyntax;
+          }
         }
             
         pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l);