X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1347f3d1e04bedd1508589173f577673ee2c5554..1890cc7d2037b5ea90e67a63b24b377244565322:/projects/stargazer/tariffs_impl.cpp?ds=sidebyside diff --git a/projects/stargazer/tariffs_impl.cpp b/projects/stargazer/tariffs_impl.cpp index dbd3d2e3..1a8ea359 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)); @@ -253,10 +253,10 @@ WriteServLog("%s Tariff \'%s\' added.", return 0; } //----------------------------------------------------------------------------- -void TARIFFS_IMPL::GetTariffsData(std::list * tdl) +void TARIFFS_IMPL::GetTariffsData(std::list * tdl) const { 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); } //-----------------------------------------------------------------------------