diff OrthancServer/DicomProtocol/DicomUserConnection.cpp @ 2335:174c3616ab6d

code review
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 17 Jul 2017 10:25:25 +0200
parents ae6245053bcf
children b5a04d983647
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Sat Jul 15 13:13:00 2017 +0200
+++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Mon Jul 17 10:25:25 2017 +0200
@@ -484,12 +484,13 @@
   static ParsedDicomFile* ConvertQueryFields(const DicomMap& fields,
                                              ModalityManufacturer manufacturer)
   {
-    // Fix outgoing C-Find requests
-    // issue for Syngo.Via and its solution was reported by
-    // Emsy Chan by private mail on 2015-06-17. According to
-    // Robert van Ommen (2015-11-30), the same fix is required for
-    // Agfa Impax.
-    // solutions was generalized for generic manufacturer since it seems to affect PhilipsADW, GEWAServer as well (check issue #31)
+    // Fix outgoing C-Find requests issue for Syngo.Via and its
+    // solution was reported by Emsy Chan by private mail on
+    // 2015-06-17. According to Robert van Ommen (2015-11-30), the
+    // same fix is required for Agfa Impax. This was generalized for
+    // generic manufacturer since it seems to affect PhilipsADW,
+    // GEWAServer as well:
+    // https://bitbucket.org/sjodogne/orthanc/issues/31/
 
     switch (manufacturer)
     {
@@ -503,9 +504,12 @@
 
         for (std::set<DicomTag>::const_iterator it = tags.begin(); it != tags.end(); ++it)
         {
-          // Replace a "*" query by an empty query ("") for "date" or "all" value representations depending on the manufacturer.
-          if ((manufacturer == ModalityManufacturer_GenericNoWildcards)
-              || (manufacturer == ModalityManufacturer_GenericNoWildcardInDates && FromDcmtkBridge::LookupValueRepresentation(*it) == ValueRepresentation_Date))
+          // Replace a "*" wildcard query by an empty query ("") for
+          // "date" or "all" value representations depending on the
+          // type of manufacturer.
+          if (manufacturer == ModalityManufacturer_GenericNoWildcards ||
+              (manufacturer == ModalityManufacturer_GenericNoWildcardInDates &&
+               FromDcmtkBridge::LookupValueRepresentation(*it) == ValueRepresentation_Date))
           {
             const DicomValue* value = fix->TestAndGetValue(*it);