diff OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp @ 4888:8523078f3f4b

added new configuration to authorize C-Find for worklist independently from other C-Find
author Alain Mazy <am@osimis.io>
date Fri, 18 Feb 2022 15:45:28 +0100
parents 43e613a7756b
children 45d6ce72a84e
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp	Wed Feb 16 09:27:25 2022 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp	Fri Feb 18 15:45:28 2022 +0100
@@ -788,10 +788,18 @@
             break;
 
           case DIMSE_C_FIND_RQ:
-            request = DicomRequestType_Find;
-            supported = true;
-            break;
-
+            {
+              std::string sopClassUid(msg.msg.CFindRQ.AffectedSOPClassUID);
+              if (sopClassUid == UID_FINDModalityWorklistInformationModel)
+              {
+                request = DicomRequestType_FindWorklist;
+              }
+              else
+              {
+                request = DicomRequestType_Find;
+              }
+              supported = true;
+            }; break;
           case DIMSE_N_ACTION_RQ:
             request = DicomRequestType_NAction;
             supported = true;
@@ -875,6 +883,7 @@
               break;
 
             case DicomRequestType_Find:
+            case DicomRequestType_FindWorklist:
               if (server_.HasFindRequestHandlerFactory() || // Should always be true
                   server_.HasWorklistRequestHandlerFactory())
               {