From 9edfae2e6ae5e074ab102fe5e5e9510ab0482eec Mon Sep 17 00:00:00 2001 From: Vlad Gluhovsky Date: Sat, 11 Jul 2015 13:13:25 +0200 Subject: [PATCH] signatures and path --- libwhisper/WhisperDB.cpp | 4 ++-- libwhisper/WhisperDB.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libwhisper/WhisperDB.cpp b/libwhisper/WhisperDB.cpp index 4bfa6caa7..fd2eef060 100644 --- a/libwhisper/WhisperDB.cpp +++ b/libwhisper/WhisperDB.cpp @@ -29,13 +29,13 @@ using namespace dev::shh; WhisperDB::WhisperDB() { - string path = dev::getDataDir(); + string path = dev::getDataDir("shh"); boost::filesystem::create_directories(path); leveldb::Options op; op.create_if_missing = true; op.max_open_files = 256; leveldb::DB* p = nullptr; - leveldb::Status status = leveldb::DB::Open(op, path + "/whisper", &p); + leveldb::Status status = leveldb::DB::Open(op, path + "/messages", &p); m_db.reset(p); if (!status.ok()) BOOST_THROW_EXCEPTION(FailedToOpenLevelDB(status.ToString())); diff --git a/libwhisper/WhisperDB.h b/libwhisper/WhisperDB.h index efea322a8..0cb97e244 100644 --- a/libwhisper/WhisperDB.h +++ b/libwhisper/WhisperDB.h @@ -30,10 +30,10 @@ namespace dev namespace shh { -struct FailedToOpenLevelDB: virtual Exception { FailedToOpenLevelDB(std::string _message = std::string()): Exception(_message) {} }; -struct FailedInsertInLevelDB: virtual Exception { FailedInsertInLevelDB(std::string _message = std::string()): Exception(_message) {} }; -struct FailedLookupInLevelDB: virtual Exception { FailedLookupInLevelDB(std::string _message = std::string()): Exception(_message) {} }; -struct FailedDeleteInLevelDB: virtual Exception { FailedDeleteInLevelDB(std::string _message = std::string()): Exception(_message) {} }; +struct FailedToOpenLevelDB: virtual Exception { FailedToOpenLevelDB(std::string const& _message): Exception(_message) {} }; +struct FailedInsertInLevelDB: virtual Exception { FailedInsertInLevelDB(std::string const& _message): Exception(_message) {} }; +struct FailedLookupInLevelDB: virtual Exception { FailedLookupInLevelDB(std::string const& _message): Exception(_message) {} }; +struct FailedDeleteInLevelDB: virtual Exception { FailedDeleteInLevelDB(std::string const& _message): Exception(_message) {} }; class WhisperDB {