#include "stg/tariff_conf.h"
#include "stg/common.h"
-#include "stg/locker.h"
#include <string>
#include <vector>
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::GetTariffsList(std::vector<std::string> * tariffsList) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::AddTariff(const std::string & name) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::DelTariff(const std::string & name) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
int POSTGRESQL_STORE::SaveTariff(const STG::TariffData & td,
const std::string & tariffName) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
int POSTGRESQL_STORE::RestoreTariff(STG::TariffData * td,
const std::string & tariffName) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{