changeset 4899:3ab57510f6dd proto-filter-instance-returning-error-code

integration mainline->proto-filter-instance-returning-error-code
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 20 Feb 2022 12:59:30 +0100
parents 656784ac6759 (diff) 181e67f9d129 (current diff)
children 260377d84e9f
files OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.0.2.cmake OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake OrthancFramework/Resources/Patches/openssl-1.1.1-conf.h.in OrthancFramework/Resources/Patches/openssl-1.1.1k.patch OrthancFramework/Sources/DicomNetworking/IStoreRequestHandler.h OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp OrthancServer/Sources/main.cpp
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp	Sun Feb 20 12:00:14 2022 +0100
+++ b/OrthancServer/Sources/main.cpp	Sun Feb 20 12:59:30 2022 +0100
@@ -87,10 +87,18 @@
 
       std::string id;
       ServerContext::StoreResult result = context_.Store(id, *toStore, StoreInstanceMode_Default);
-      return result.GetCStoreStatusCode();
+
+      if (result.GetStatus() == StoreStatus_FilteredOut)
+      {
+        return STATUS_STORE_Refused_OutOfResources;  // C-Store "Out of Resources" error code (0xa700)
+      }
+      else
+      {
+        return result.GetCStoreStatusCode();
+      }
     }
 
-    return STATUS_STORE_Error_CannotUnderstand;
+    return STATUS_STORE_Error_CannotUnderstand;  // C-Store "Cannot understand" error code (0xc000)
   }
 };