changeset 322:7e9622c64c40

compatibility with Orthanc framework < 1.9.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Jul 2021 15:52:15 +0200
parents eb0b04c10bc4
children ae4c0c7b2254
files Framework/Common/DatabaseManager.cpp
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Common/DatabaseManager.cpp	Tue Jul 20 08:32:28 2021 +0200
+++ b/Framework/Common/DatabaseManager.cpp	Tue Jul 20 15:52:15 2021 +0200
@@ -60,8 +60,11 @@
     
   void DatabaseManager::CloseIfUnavailable(Orthanc::ErrorCode e)
   {
-    if (e != Orthanc::ErrorCode_Success &&
-        e != Orthanc::ErrorCode_DatabaseCannotSerialize)
+    if (e != Orthanc::ErrorCode_Success
+#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 9, 2)
+        && e != Orthanc::ErrorCode_DatabaseCannotSerialize
+#endif
+      )
     {
       transaction_.reset(NULL);
     }