diff options
author | Alan Conway <aconway@apache.org> | 2008-02-08 22:27:38 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-02-08 22:27:38 +0000 |
commit | 5f10d4097d84da6077409ef0ae8b20af10fc6d61 (patch) | |
tree | 662a9b996c29464aa3265f443f4a892871cccc7a /qpid/cpp/src/qpid/DataDir.cpp | |
parent | 328ef5730237a5fa8a160a39ea4a03852f76714e (diff) | |
download | qpid-python-5f10d4097d84da6077409ef0ae8b20af10fc6d61.tar.gz |
From Ted Ross, https://issues.apache.org/jira/browse/QPID-782
The attached patch makes the following changes:
The --load-dir option has been renamed to --module-dir
The --no-modules option and been replaced by the --no-module-dir option. This new option suppresses ONLY the loading of modules from the directory.
The --no-data-dir option has been added to suppress the use of a data directory.
Logging has been added for data directory lock and unlock.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@620017 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/DataDir.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/DataDir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/DataDir.cpp b/qpid/cpp/src/qpid/DataDir.cpp index baf536c109..f5f5444ac0 100644 --- a/qpid/cpp/src/qpid/DataDir.cpp +++ b/qpid/cpp/src/qpid/DataDir.cpp @@ -20,6 +20,7 @@ #include "Exception.h" #include "DataDir.h" +#include "qpid/log/Statement.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -32,7 +33,10 @@ DataDir::DataDir (std::string path) : dirPath (path) { if (!enabled) + { + QPID_LOG (info, "No data directory - Disabling persistent configuration"); return; + } const char *cpath = dirPath.c_str (); struct stat s; @@ -55,14 +59,20 @@ DataDir::DataDir (std::string path) : oss << "Error locking data directory: errno=" << errno; throw Exception (oss.str ()); } + + QPID_LOG (info, "Locked data direcory: " << dirPath); } DataDir::~DataDir () { + if (dirPath.empty ()) + return; + std::string lockFile (dirPath); lockFile = lockFile + "/lock"; ::unlink (lockFile.c_str ()); + QPID_LOG (info, "Unlocked data directory: " << dirPath); } } // namespace qpid |