X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1347f3d1e04bedd1508589173f577673ee2c5554..db323584230f6d5b4a6e16574fd0baadc9d465e5:/projects/stargazer/tariffs_impl.cpp diff --git a/projects/stargazer/tariffs_impl.cpp b/projects/stargazer/tariffs_impl.cpp index dbd3d2e3..aee486d7 100644 --- a/projects/stargazer/tariffs_impl.cpp +++ b/projects/stargazer/tariffs_impl.cpp @@ -63,7 +63,7 @@ pthread_mutex_destroy(&mutex); //----------------------------------------------------------------------------- int TARIFFS_IMPL::ReadTariffs() { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); vector tariffsList; if (store->GetTariffsList(&tariffsList)) @@ -91,7 +91,7 @@ return 0; //----------------------------------------------------------------------------- size_t TARIFFS_IMPL::Count() const { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); return tariffs.size(); } //----------------------------------------------------------------------------- @@ -100,7 +100,7 @@ const TARIFF * TARIFFS_IMPL::FindByName(const string & name) const if (name == NO_TARIFF_NAME) return &noTariff; -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); list::const_iterator ti; ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name)); @@ -123,7 +123,7 @@ if (!priv->tariffChg) return -1; } -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); list::iterator ti; ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(td.tariffConf.name)); @@ -166,7 +166,7 @@ if (!priv->tariffChg) TARIFF_DATA td; { - STG_LOCKER lock(&mutex, __FILE__, __LINE__); + STG_LOCKER lock(&mutex); list::iterator ti; ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name)); @@ -217,7 +217,7 @@ if (!priv->tariffChg) } { - STG_LOCKER lock(&mutex, __FILE__, __LINE__); + STG_LOCKER lock(&mutex); list::iterator ti; ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name)); @@ -256,7 +256,7 @@ return 0; void TARIFFS_IMPL::GetTariffsData(std::list * tdl) { assert(tdl != NULL && "Tariffs data list is not null"); -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); Tariffs::const_iterator it = tariffs.begin(); for (; it != tariffs.end(); ++it) @@ -267,25 +267,25 @@ for (; it != tariffs.end(); ++it) //----------------------------------------------------------------------------- void TARIFFS_IMPL::AddNotifierAdd(NOTIFIER_BASE * n) { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); onAddNotifiers.insert(n); } //----------------------------------------------------------------------------- void TARIFFS_IMPL::DelNotifierAdd(NOTIFIER_BASE * n) { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); onAddNotifiers.erase(n); } //----------------------------------------------------------------------------- void TARIFFS_IMPL::AddNotifierDel(NOTIFIER_BASE * n) { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); onDelNotifiers.insert(n); } //----------------------------------------------------------------------------- void TARIFFS_IMPL::DelNotifierDel(NOTIFIER_BASE * n) { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); onDelNotifiers.erase(n); } //-----------------------------------------------------------------------------