diff OrthancServer/ServerContext.cpp @ 2825:8aa6aef11b70

New configuration option "OverwriteInstances" to choose how duplicate SOPInstanceUID are handled
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Sep 2018 15:24:01 +0200
parents 925d8dc03a23
children ae8e72009e64
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp	Tue Sep 18 16:31:42 2018 +0200
+++ b/OrthancServer/ServerContext.cpp	Wed Sep 19 15:24:01 2018 +0200
@@ -354,6 +354,13 @@
         return StoreStatus_FilteredOut;
       }
 
+      {
+        // Remove the file from the DicomCache (useful if
+        // "OverwriteInstances" is set to "true")
+        boost::mutex::scoped_lock lock(dicomCacheMutex_);
+        dicomCache_.Invalidate(resultPublicId);
+      }
+
       // TODO Should we use "gzip" instead?
       CompressionType compression = (compressionEnabled_ ? CompressionType_ZlibWithSize : CompressionType_None);