X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8e80bb9cec2c90dd61f810fb1525932a434288eb..2196a3a0cdc5384c082febb7f4aa5994cc7d80db:/projects/stargazer/plugins/store/firebird/firebird_store_messages.cpp diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_messages.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_messages.cpp index 90c3e573..d2c4a3ee 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_messages.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_messages.cpp @@ -36,7 +36,7 @@ //----------------------------------------------------------------------------- int FIREBIRD_STORE::AddMessage(STG::Message * msg, const std::string & login) const { -STG_LOCKER lock(&mutex); +std::lock_guard lock(m_mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -73,7 +73,7 @@ return 0; int FIREBIRD_STORE::EditMessage(const STG::Message & msg, const std::string & login) const { -STG_LOCKER lock(&mutex); +std::lock_guard lock(m_mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -111,7 +111,7 @@ int FIREBIRD_STORE::GetMessage(uint64_t id, STG::Message * msg, const std::string &) const { -STG_LOCKER lock(&mutex); +std::lock_guard lock(m_mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -157,7 +157,7 @@ return 0; //----------------------------------------------------------------------------- int FIREBIRD_STORE::DelMessage(uint64_t id, const std::string &) const { -STG_LOCKER lock(&mutex); +std::lock_guard lock(m_mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -185,7 +185,7 @@ return 0; int FIREBIRD_STORE::GetMessageHdrs(std::vector * hdrsList, const std::string & login) const { -STG_LOCKER lock(&mutex); +std::lock_guard lock(m_mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr);