Mercurial > hg > orthanc-databases
comparison Framework/Common/DatabaseManager.cpp @ 235:f2b32d31fc99
fix lsb build, fix backward compatibility with SDK <= 1.9.1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Apr 2021 11:42:32 +0200 |
parents | d1b124d116c1 |
children | a063bbf10a3e |
comparison
equal
deleted
inserted
replaced
234:d1b124d116c1 | 235:f2b32d31fc99 |
---|---|
56 } | 56 } |
57 | 57 |
58 | 58 |
59 void DatabaseManager::CloseIfUnavailable(Orthanc::ErrorCode e) | 59 void DatabaseManager::CloseIfUnavailable(Orthanc::ErrorCode e) |
60 { | 60 { |
61 if (e != Orthanc::ErrorCode_Success && | 61 bool failure; |
62 e != Orthanc::ErrorCode_DatabaseCannotSerialize) | 62 |
63 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) | |
64 failure = (e != Orthanc::ErrorCode_Success && | |
65 e != Orthanc::ErrorCode_DatabaseCannotSerialize); | |
66 #else | |
67 failure = (e != Orthanc::ErrorCode_Success); | |
68 #endif | |
69 | |
70 if (failure) | |
63 { | 71 { |
64 transaction_.reset(NULL); | 72 transaction_.reset(NULL); |
65 } | 73 } |
66 | 74 |
67 if (e == Orthanc::ErrorCode_DatabaseUnavailable) | 75 if (e == Orthanc::ErrorCode_DatabaseUnavailable) |