diff options
author | Bernard Normier <bernard@zeroc.com> | 2010-05-17 19:02:56 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2010-05-17 19:02:56 -0400 |
commit | 59942fbf77e84789899dc70adddeadd27c2f63f5 (patch) | |
tree | 449bdf09bd97fe1dda25673dd3fbca8a71fe1013 /cpp/src/Freeze/SharedDbEnv.cpp | |
parent | SIGPIPE patch for Blair / Imageworks (diff) | |
download | ice-59942fbf77e84789899dc70adddeadd27c2f63f5.tar.bz2 ice-59942fbf77e84789899dc70adddeadd27c2f63f5.tar.xz ice-59942fbf77e84789899dc70adddeadd27c2f63f5.zip |
Fixed bugs #3573 and #4730 - Freeze log auto remove broken
Diffstat (limited to 'cpp/src/Freeze/SharedDbEnv.cpp')
-rw-r--r-- | cpp/src/Freeze/SharedDbEnv.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp index 1f514ad1181..9692794e041 100644 --- a/cpp/src/Freeze/SharedDbEnv.cpp +++ b/cpp/src/Freeze/SharedDbEnv.cpp @@ -69,11 +69,11 @@ operator<(const MapKey& lhs, const MapKey& rhs) ((lhs.communicator == rhs.communicator) && (lhs.envName < rhs.envName)); } -#if DB_VERSION_MAJOR != 4 -#error Freeze requires DB 4.x +#if DB_VERSION_MAJOR < 4 +#error Freeze requires DB 4.x or greater #endif -#if DB_VERSION_MINOR < 3 +#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 3 void dbErrCallback(const char* prefix, char* msg) #else @@ -553,11 +553,14 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName, if(autoDelete) { - #ifdef DB_LOG_AUTO_REMOVE //This is the new name for the property from DB 4.7 - _env->set_flags(DB_LOG_AUTO_REMOVE, 1); - #else - _env->set_flags(DB_LOG_AUTOREMOVE, 1); - #endif +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 7) + // + // Old API + // + _env->set_flags(DB_LOG_AUTOREMOVE, 1); +#else + _env->log_set_config(DB_LOG_AUTO_REMOVE, 1); +#endif } // |