diff Framework/Common/DatabaseManager.cpp @ 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 87f0e29a1dc1
children 16aac0287485
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);
     }