changeset 57:ca604fa6714a

Take the configuration "RestrictTransferSyntaxes" into account not only for Decoding but also for Transcoding
author Alain Mazy <am@osimis.io>
date Mon, 25 Oct 2021 13:01:27 +0200
parents 56f3fa1b474b
children f237a8095e86
files NEWS Plugin/Plugin.cpp
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Jul 06 12:06:16 2021 +0200
+++ b/NEWS	Mon Oct 25 13:01:27 2021 +0200
@@ -1,6 +1,8 @@
 Pending changes in the mainline
 ===============================
 
+* Take the configuration "RestrictTransferSyntaxes" into account not 
+  only for Decoding but also for Transcoding.
 
 Version 1.4 (2021-07-06)
 ========================
--- a/Plugin/Plugin.cpp	Tue Jul 06 12:06:16 2021 +0200
+++ b/Plugin/Plugin.cpp	Mon Oct 25 13:01:27 2021 +0200
@@ -270,6 +270,11 @@
 {
   try
   {
+    if (!IsTransferSyntaxEnabled(buffer, size))
+    {
+      return OrthancPluginErrorCode_Plugin;
+    }
+
     std::unique_ptr<Orthanc::Semaphore::Locker> locker;
     
     if (hasThrottling_)