changeset 5372:94a52168480b

Fix loading of DCMTK dictionary in the MultitenantDicom plugin when built dynamically
author Alain Mazy <am@osimis.io>
date Thu, 17 Aug 2023 11:25:59 +0200
parents a8385880902f
children 123a94dd57df
files NEWS OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Wed Aug 16 09:14:17 2023 +0200
+++ b/NEWS	Thu Aug 17 11:25:59 2023 +0200
@@ -13,6 +13,8 @@
 * Fix unit test PngWriter.Color16Pattern on big-endian architectures,
   as suggested by Etienne Mollier: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041813
 * Prevent the leak of the full path of the source files in the binaries
+* Fix loading of DCMTK dictionary in the MultitenantDicom plugin when built dynamically:
+  https://discourse.orthanc-server.org/t/dimse-failure-using-multitenant-plugin/3665
 
 
 Version 1.12.1 (2023-07-04)
--- a/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp	Wed Aug 16 09:14:17 2023 +0200
+++ b/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp	Thu Aug 17 11:25:59 2023 +0200
@@ -119,6 +119,10 @@
       return -1;
     }
 
+    // For static builds, this is not required - but does not harm - because the dictionary seems to be shared between the Orthanc Core and the plugin.
+    // For dynamic builds, this is however required.  See https://discourse.orthanc-server.org/t/dimse-failure-using-multitenant-plugin/3665
+    Orthanc::FromDcmtkBridge::InitializeDictionary(false /* loadPrivateDictionary */);
+
     /* Disable "gethostbyaddr" (which results in memory leaks) and use raw IP addresses */
     dcmDisableGethostbyaddr.set(OFTrue);