]> git.stg.codes - stg.git/commitdiff
Simplified STG_LOCKER.
authorMaxim Mamontov <faust.madf@gmail.com>
Mon, 9 Jun 2014 09:16:49 +0000 (12:16 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Mon, 9 Jun 2014 09:16:49 +0000 (12:16 +0300)
55 files changed:
include/stg/locker.h [new file with mode: 0644]
include/stg/user_property.h
projects/rscriptd/Makefile
projects/rscriptd/build
projects/rscriptd/listener.cpp
projects/sgauthstress/Makefile
projects/sgauthstress/build
projects/sgauthstress/proto.cpp
projects/stargazer/Makefile
projects/stargazer/actions.inl.h
projects/stargazer/admins_impl.cpp
projects/stargazer/build
projects/stargazer/corps_impl.cpp
projects/stargazer/eventloop.cpp
projects/stargazer/eventloop.h
projects/stargazer/plugins/authorization/ao/Makefile
projects/stargazer/plugins/authorization/inetaccess/Makefile
projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
projects/stargazer/plugins/authorization/stress/Makefile
projects/stargazer/plugins/capture/divert_freebsd/Makefile
projects/stargazer/plugins/capture/ether_freebsd/Makefile
projects/stargazer/plugins/configuration/rpcconfig/Makefile
projects/stargazer/plugins/configuration/sgconfig/Makefile
projects/stargazer/plugins/other/ping/Makefile
projects/stargazer/plugins/other/ping/ping.cpp
projects/stargazer/plugins/other/radius/Makefile
projects/stargazer/plugins/other/rscript/Makefile
projects/stargazer/plugins/other/rscript/rscript.cpp
projects/stargazer/plugins/other/smux/Makefile
projects/stargazer/plugins/store/files/Makefile
projects/stargazer/plugins/store/files/file_store.cpp
projects/stargazer/plugins/store/firebird/Makefile
projects/stargazer/plugins/store/firebird/firebird_store_admins.cpp
projects/stargazer/plugins/store/firebird/firebird_store_corporations.cpp
projects/stargazer/plugins/store/firebird/firebird_store_messages.cpp
projects/stargazer/plugins/store/firebird/firebird_store_services.cpp
projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp
projects/stargazer/plugins/store/firebird/firebird_store_users.cpp
projects/stargazer/plugins/store/postgresql/Makefile
projects/stargazer/plugins/store/postgresql/postgresql_store_admins.cpp
projects/stargazer/plugins/store/postgresql/postgresql_store_corporations.cpp
projects/stargazer/plugins/store/postgresql/postgresql_store_messages.cpp
projects/stargazer/plugins/store/postgresql/postgresql_store_services.cpp
projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp
projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp
projects/stargazer/services_impl.cpp
projects/stargazer/tariffs_impl.cpp
projects/stargazer/traffcounter_impl.cpp
projects/stargazer/user_impl.cpp
projects/stargazer/users_impl.cpp
stglibs/locker.lib/Makefile [deleted file]
stglibs/locker.lib/include/stg/locker.h [deleted file]
stglibs/locker.lib/locker.cpp [deleted file]
stglibs/pinger.lib/pinger.cpp
stglibs/smux.lib/IpAddress.c

diff --git a/include/stg/locker.h b/include/stg/locker.h
new file mode 100644 (file)
index 0000000..fe1014d
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/*
+ *    Author : Boris Mikhailenko <stg34@stargazer.dp.ua>
+ */
+
+/*
+ $Revision: 1.5 $
+ $Date: 2010/03/04 11:57:11 $
+ $Author: faust $
+*/
+
+
+#ifndef STG_LOCKER_H
+#define STG_LOCKER_H
+
+#include <pthread.h>
+
+//-----------------------------------------------------------------------------
+class STG_LOCKER
+{
+public:
+    STG_LOCKER(pthread_mutex_t * m)
+        : mutex(m)
+        {
+        pthread_mutex_lock(mutex);
+        }
+
+    ~STG_LOCKER()
+        {
+        pthread_mutex_unlock(mutex);
+        }
+private:
+    STG_LOCKER(const STG_LOCKER & rvalue);
+    STG_LOCKER & operator=(const STG_LOCKER & rvalue);
+
+    pthread_mutex_t * mutex;
+};
+//-----------------------------------------------------------------------------
+
+#endif //STG_LOCKER_H
index 97c1af51b7335adeb235422dd3043e847bdeb2dc..824c668e4ddc41794b78b61870bca7c02d9b3a2c 100644 (file)
@@ -214,7 +214,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::Set(const varT & rvalue)
 {
 inline
 void USER_PROPERTY<varT>::Set(const varT & rvalue)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 
 typename std::set<PROPERTY_NOTIFIER_BASE<varT> *>::iterator ni;
 
 
 typename std::set<PROPERTY_NOTIFIER_BASE<varT> *>::iterator ni;
 
@@ -244,7 +244,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::AddBeforeNotifier(PROPERTY_NOTIFIER_BASE<varT> * n)
 {
 inline
 void USER_PROPERTY<varT>::AddBeforeNotifier(PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 beforeNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 beforeNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
@@ -252,7 +252,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n)
 {
 inline
 void USER_PROPERTY<varT>::DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 beforeNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n));
 }
 //-----------------------------------------------------------------------------
 beforeNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n));
 }
 //-----------------------------------------------------------------------------
@@ -260,7 +260,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::AddAfterNotifier(PROPERTY_NOTIFIER_BASE<varT> * n)
 {
 inline
 void USER_PROPERTY<varT>::AddAfterNotifier(PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 afterNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 afterNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
@@ -268,7 +268,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::DelAfterNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n)
 {
 inline
 void USER_PROPERTY<varT>::DelAfterNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 afterNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n));
 }
 //-----------------------------------------------------------------------------
 afterNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n));
 }
 //-----------------------------------------------------------------------------
index ce0b76dce38c50fddce86e887aad56e16d05363a..adbc4eb38dca2336acb407bce7542975b23f429c 100644 (file)
@@ -13,7 +13,6 @@ SRCS = ./main.cpp \
 STGLIBS = scriptexecuter \
           conffiles \
          logger \
 STGLIBS = scriptexecuter \
           conffiles \
          logger \
-         locker \
          crypto \
           common
 
          crypto \
           common
 
index 5746d8226b86b89be2c8379e3bfbbbcfce218756..59927348bab369f99774c204ffbc1fd3e409a52c 100755 (executable)
@@ -64,7 +64,6 @@ printf "       Building rscriptd for $sys $release\n"
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
-          locker.lib
           crypto.lib
           common.lib
           scriptexecuter.lib
           crypto.lib
           common.lib
           scriptexecuter.lib
index 9fe4c0f0c37cce0730be4f730c7630028a63ddd4..cc2a05603c88666c9d421fbf752a0e95160563f6 100644 (file)
@@ -311,7 +311,7 @@ else if (packetHead.packetType == RS_DISCONNECT_PACKET)
         }
     }
 
         }
     }
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 pending.push_back(data);
 
 return false;
 pending.push_back(data);
 
 return false;
@@ -411,7 +411,7 @@ while (it != pending.end() && count < 256)
     ++it;
     ++count;
     }
     ++it;
     ++count;
     }
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 pending.erase(pending.begin(), it);
 }
 //-----------------------------------------------------------------------------
 pending.erase(pending.begin(), it);
 }
 //-----------------------------------------------------------------------------
index 4474e77fd13c9aa2f9903144d3de30e55636b735..f88e59c614427db99bf529f9e2725ef5d5d56c88 100644 (file)
@@ -9,7 +9,6 @@ SRCS = main.cpp \
        proto.cpp
 
 STGLIBS = dotconfpp \
        proto.cpp
 
 STGLIBS = dotconfpp \
-         locker \
          crypto \
          common
 
          crypto \
          common
 
@@ -40,7 +39,7 @@ all: libs plugins $(PROG) ../../Makefile.conf
 libs:
        $(MAKE) -C $(DIR_LIBSRC)
 
 libs:
        $(MAKE) -C $(DIR_LIBSRC)
 
-plugins: libs 
+plugins: libs
        $(MAKE) -C $(DIR_PLUGINS)
 
 $(PROG): $(OBJS)
        $(MAKE) -C $(DIR_PLUGINS)
 
 $(PROG): $(OBJS)
index 825f00b5cde4b0ef7f933f1205ecf9344e4e1a7b..676938ad6ff811f7a993e2c9c760406d120ed6b2 100755 (executable)
@@ -60,7 +60,7 @@ then
 fi
 
 if [ "$OS" = "unknown" ]
 fi
 
 if [ "$OS" = "unknown" ]
-then 
+then
     printf "################################################################################\n"
     printf "# Sorry, but sgauthstress currently supported by Linux, FreeBSD 4.x-8.x        #\n"
     printf "################################################################################\n"
     printf "################################################################################\n"
     printf "# Sorry, but sgauthstress currently supported by Linux, FreeBSD 4.x-8.x        #\n"
     printf "################################################################################\n"
@@ -72,9 +72,8 @@ printf "       Building sgauthstress for $sys $release\n"
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
-          locker.lib
-          crypto.lib 
-         common.lib 
+          crypto.lib
+         common.lib
           conffiles.lib
           dotconfpp.lib"
 
           conffiles.lib
           dotconfpp.lib"
 
index 2fd0314018cd07819f6cb7cc6b9a7320a30fdccc..3150002ddbd8dc0c163b54a993055d6313d47118 100644 (file)
@@ -134,7 +134,7 @@ return true;
 
 void PROTO::AddUser(const USER & user, bool connect)
 {
 
 void PROTO::AddUser(const USER & user, bool connect)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 users.push_back(std::make_pair(user.GetIP(), user));
 users.back().second.InitNetwork();
 
 users.push_back(std::make_pair(user.GetIP(), user));
 users.back().second.InitNetwork();
 
@@ -153,7 +153,7 @@ if (connect)
 bool PROTO::Connect(uint32_t ip)
 {
 std::list<std::pair<uint32_t, USER> >::iterator it;
 bool PROTO::Connect(uint32_t ip)
 {
 std::list<std::pair<uint32_t, USER> >::iterator it;
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 it = std::find_if(users.begin(), users.end(), HasIP(ip));
 if (it == users.end())
     return false;
 it = std::find_if(users.begin(), users.end(), HasIP(ip));
 if (it == users.end())
     return false;
@@ -166,7 +166,7 @@ return RealConnect(&it->second);
 bool PROTO::Disconnect(uint32_t ip)
 {
 std::list<std::pair<uint32_t, USER> >::iterator it;
 bool PROTO::Disconnect(uint32_t ip)
 {
 std::list<std::pair<uint32_t, USER> >::iterator it;
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 it = std::find_if(users.begin(), users.end(), HasIP(ip));
 if (it == users.end())
     return false;
 it = std::find_if(users.begin(), users.end(), HasIP(ip));
 if (it == users.end())
     return false;
@@ -182,7 +182,7 @@ while (running)
     {
     int res;
         {
     {
     int res;
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         res = poll(&pollFds.front(), pollFds.size(), timeout);
         }
     if (res < 0)
         res = poll(&pollFds.front(), pollFds.size(), timeout);
         }
     if (res < 0)
@@ -205,7 +205,7 @@ stopped = true;
 
 void PROTO::CheckTimeouts()
 {
 
 void PROTO::CheckTimeouts()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::list<std::pair<uint32_t, USER> >::iterator it;
 for (it = users.begin(); it != users.end(); ++it)
     {
 std::list<std::pair<uint32_t, USER> >::iterator it;
 for (it = users.begin(); it != users.end(); ++it)
     {
@@ -230,7 +230,7 @@ bool PROTO::RecvPacket()
 bool result = true;
 std::vector<struct pollfd>::iterator it;
 std::list<std::pair<uint32_t, USER> >::iterator userIt;
 bool result = true;
 std::vector<struct pollfd>::iterator it;
 std::list<std::pair<uint32_t, USER> >::iterator userIt;
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 for (it = pollFds.begin(), userIt = users.begin(); it != pollFds.end() && userIt != users.end(); ++it, ++userIt)
     {
     if (it->revents)
 for (it = pollFds.begin(), userIt = users.begin(); it != pollFds.end() && userIt != users.end(); ++it, ++userIt)
     {
     if (it->revents)
index aa2b6f90d65f74fa309c3140035a3f52c95c1a82..1b109fefd32f603cedac22ba5c8afc6fdd504a5e 100644 (file)
@@ -26,7 +26,6 @@ SRCS = ./admin_impl.cpp \
 
 STGLIBS = scriptexecuter \
           dotconfpp \
 
 STGLIBS = scriptexecuter \
           dotconfpp \
-         locker \
          logger \
          common
 
          logger \
          common
 
index 1a8102285972c31fcb8b17af18095b422a426001..b5b3f8a5a20090977ed3f3f2cd43bb8aad5929f4 100644 (file)
@@ -26,7 +26,7 @@ ACTIONS_LIST::~ACTIONS_LIST()
 {
 
     {
 {
 
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
 
     parent::iterator it(parent::begin());
     while (it != parent::end()) 
 
     parent::iterator it(parent::begin());
     while (it != parent::end()) 
@@ -41,49 +41,49 @@ pthread_mutex_destroy(&mutex);
 inline
 ACTIONS_LIST::parent::iterator ACTIONS_LIST::begin()
 { 
 inline
 ACTIONS_LIST::parent::iterator ACTIONS_LIST::begin()
 { 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 return parent::begin();
 }
 
 inline
 ACTIONS_LIST::parent::iterator ACTIONS_LIST::end()
 { 
 return parent::begin();
 }
 
 inline
 ACTIONS_LIST::parent::iterator ACTIONS_LIST::end()
 { 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 return parent::end();
 }
 
 inline
 ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::begin() const
 { 
 return parent::end();
 }
 
 inline
 ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::begin() const
 { 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 return parent::begin();
 }
 
 inline
 ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::end() const
 { 
 return parent::begin();
 }
 
 inline
 ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::end() const
 { 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 return parent::end();
 }
 
 inline
 bool ACTIONS_LIST::empty() const
 {
 return parent::end();
 }
 
 inline
 bool ACTIONS_LIST::empty() const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 return parent::empty();
 }
 
 inline
 size_t ACTIONS_LIST::size() const
 {
 return parent::empty();
 }
 
 inline
 size_t ACTIONS_LIST::size() const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 return parent::size();
 }
 
 inline
 void ACTIONS_LIST::swap(ACTIONS_LIST & list)
 {
 return parent::size();
 }
 
 inline
 void ACTIONS_LIST::swap(ACTIONS_LIST & list)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 parent::swap(list);
 }
 
 parent::swap(list);
 }
 
@@ -93,14 +93,14 @@ void ACTIONS_LIST::Enqueue(ACTIVE_CLASS & ac,
                            typename ACTOR<ACTIVE_CLASS, DATA_TYPE>::TYPE a,
                            DATA_TYPE d)
 {
                            typename ACTOR<ACTIVE_CLASS, DATA_TYPE>::TYPE a,
                            DATA_TYPE d)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 push_back(new ACTION<ACTIVE_CLASS, DATA_TYPE>(ac, a, d));
 }
 
 inline
 void ACTIONS_LIST::InvokeAll()
 {
 push_back(new ACTION<ACTIVE_CLASS, DATA_TYPE>(ac, a, d));
 }
 
 inline
 void ACTIONS_LIST::InvokeAll()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::for_each(
         parent::begin(),
         parent::end(),
 std::for_each(
         parent::begin(),
         parent::end(),
index 10d1108e45fa308e00021c6094cecd5ded75a6bb..08656a49c86882d33e0b353411d68c39647127c6 100644 (file)
@@ -57,7 +57,7 @@ Read();
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Add(const string & login, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Add(const string & login, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->adminChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->adminChg)
@@ -96,7 +96,7 @@ return -1;
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Del(const string & login, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Del(const string & login, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 ADMIN_IMPL adm(0, login, "");
 const PRIV * priv = admin->GetPriv();
 
 ADMIN_IMPL adm(0, login, "");
 const PRIV * priv = admin->GetPriv();
 
@@ -141,7 +141,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Change(const ADMIN_CONF & ac, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Change(const ADMIN_CONF & ac, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->adminChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->adminChg)
@@ -178,7 +178,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Read()
 {
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Read()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 vector<string> adminsList;
 if (store->GetAdminsList(&adminsList) < 0)
     {
 vector<string> adminsList;
 if (store->GetAdminsList(&adminsList) < 0)
     {
@@ -205,7 +205,7 @@ bool ADMINS_IMPL::Find(const string & l, ADMIN ** admin)
 {
 assert(admin != NULL && "Pointer to admin is not null");
 
 {
 assert(admin != NULL && "Pointer to admin is not null");
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (data.empty())
     {
     printfd(__FILE__, "No admin in system!\n");
 if (data.empty())
     {
     printfd(__FILE__, "No admin in system!\n");
@@ -227,7 +227,7 @@ return true;
 //-----------------------------------------------------------------------------
 bool ADMINS_IMPL::Exists(const string & login) const
 {
 //-----------------------------------------------------------------------------
 bool ADMINS_IMPL::Exists(const string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
@@ -245,7 +245,7 @@ return false;
 //-----------------------------------------------------------------------------
 bool ADMINS_IMPL::Correct(const string & login, const std::string & password, ADMIN ** admin)
 {
 //-----------------------------------------------------------------------------
 bool ADMINS_IMPL::Correct(const string & login, const std::string & password, ADMIN ** admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
@@ -272,7 +272,7 @@ return true;
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::OpenSearch() const
 {
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::OpenSearch() const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 handle++;
 searchDescriptors[handle] = data.begin();
 return handle;
 handle++;
 searchDescriptors[handle] = data.begin();
 return handle;
@@ -280,7 +280,7 @@ return handle;
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::SearchNext(int h, ADMIN_CONF * ac) const
 {
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::SearchNext(int h, ADMIN_CONF * ac) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
     WriteServLog("ADMINS. Incorrect search handle.");
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
     WriteServLog("ADMINS. Incorrect search handle.");
@@ -299,7 +299,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::CloseSearch(int h) const
 {
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::CloseSearch(int h) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
index 12ec9d23b896065584c3503ecdab2a04133af8af..9875d0a416672e600897fb746a99171725649f9e 100755 (executable)
@@ -92,7 +92,6 @@ printf "       Building STG 2.4 for $sys $release\n"
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
-          locker.lib
           crypto.lib
           common.lib
           scriptexecuter.lib
           crypto.lib
           common.lib
           scriptexecuter.lib
index a366f46674635dc29cb332396f419ff567630902..4109bb28a567b53e2f845c3bc17953e923fe94dd 100644 (file)
@@ -43,7 +43,7 @@ Read();
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::Add(const CORP_CONF & corp, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::Add(const CORP_CONF & corp, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->corpChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->corpChg)
@@ -81,7 +81,7 @@ return -1;
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::Del(const std::string & name, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::Del(const std::string & name, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->corpChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->corpChg)
@@ -125,7 +125,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::Change(const CORP_CONF & corp, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::Change(const CORP_CONF & corp, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->corpChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->corpChg)
@@ -161,7 +161,7 @@ return 0;
 //-----------------------------------------------------------------------------
 bool CORPORATIONS_IMPL::Read()
 {
 //-----------------------------------------------------------------------------
 bool CORPORATIONS_IMPL::Read()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::vector<std::string> corpsList;
 if (store->GetCorpsList(&corpsList) < 0)
     {
 std::vector<std::string> corpsList;
 if (store->GetCorpsList(&corpsList) < 0)
     {
@@ -188,7 +188,7 @@ bool CORPORATIONS_IMPL::Find(const std::string & name, CORP_CONF * corp)
 {
 assert(corp != NULL && "Pointer to corporation is not null");
 
 {
 assert(corp != NULL && "Pointer to corporation is not null");
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (data.empty())
     return false;
 
 if (data.empty())
     return false;
 
@@ -205,7 +205,7 @@ return true;
 //-----------------------------------------------------------------------------
 bool CORPORATIONS_IMPL::Exists(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 bool CORPORATIONS_IMPL::Exists(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
@@ -222,7 +222,7 @@ return false;
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::OpenSearch() const
 {
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::OpenSearch() const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 handle++;
 searchDescriptors[handle] = data.begin();
 return handle;
 handle++;
 searchDescriptors[handle] = data.begin();
 return handle;
@@ -230,7 +230,7 @@ return handle;
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::SearchNext(int h, CORP_CONF * corp) const
 {
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::SearchNext(int h, CORP_CONF * corp) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
     WriteServLog("CORPORATIONS. Incorrect search handle.");
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
     WriteServLog("CORPORATIONS. Incorrect search handle.");
@@ -247,7 +247,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::CloseSearch(int h) const
 {
 //-----------------------------------------------------------------------------
 int CORPORATIONS_IMPL::CloseSearch(int h) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
index 6cc59c94bde7d039c225e976d13adfbdf99181f1..36a77e9e21929c26e19e3ad9ecea86559eed0a1e 100644 (file)
@@ -63,7 +63,7 @@ printfd(__FILE__, "EVENT_LOOP::Runner - Before start\n");
 while (_running)
     {
         {
 while (_running)
     {
         {
-        STG_LOCKER lock(&_mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&_mutex);
         // Check for any actions...
         if (empty())
             {
         // Check for any actions...
         if (empty())
             {
@@ -101,7 +101,7 @@ EVENT_LOOP & EVENT_LOOP_SINGLETON::GetInstance()
 // Double-checking technique
 if (!_instance)
     {
 // Double-checking technique
 if (!_instance)
     {
-    STG_LOCKER lock(&singletonMutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&singletonMutex);
     if (!_instance)
         {
         CreateInstance();
     if (!_instance)
         {
         CreateInstance();
index 35de3675b290b7a2c8a2fbb5f110fa00006b7a52..0e7981421ea289858b31beda001e859d707e7358 100644 (file)
@@ -53,7 +53,7 @@ void EVENT_LOOP::Enqueue(ACTIVE_CLASS & ac,
                          typename ACTOR<ACTIVE_CLASS, DATA_TYPE>::TYPE a,
                          DATA_TYPE d)
 {
                          typename ACTOR<ACTIVE_CLASS, DATA_TYPE>::TYPE a,
                          DATA_TYPE d)
 {
-STG_LOCKER lock(&_mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&_mutex);
 // Add new action
 ACTIONS_LIST::Enqueue(ac, a, d);
 // Signal about new action
 // Add new action
 ACTIONS_LIST::Enqueue(ac, a, d);
 // Signal about new action
index 0e356aa1831a4fc659a4ed471483a20cf16c2397..cd9b7c0547e744f5c84fb9872bd6aea62f44ea9c 100644 (file)
@@ -10,7 +10,6 @@ SRCS = ./ao.cpp
 
 STGLIBS = scriptexecuter \
          logger \
 
 STGLIBS = scriptexecuter \
          logger \
-         locker \
          common
 
 include ../../Makefile.in
          common
 
 include ../../Makefile.in
index 6f735ad8721a828e609c156a9cda07ca398a5f64..f7eeabb314534d2ebe8800827f2f9feeef0e4c31 100644 (file)
@@ -13,7 +13,6 @@ SRCS = ./inetaccess.cpp
 STGLIBS = common \
          crypto \
          logger \
 STGLIBS = common \
          crypto \
          logger \
-         locker \
          scriptexecuter
 
 include ../../Makefile.in
          scriptexecuter
 
 include ../../Makefile.in
index 7894d4910cba16205d8db606c26487cc365ab11b..03e304227ace7b74dc46343bb5687b27f68e6b75 100644 (file)
@@ -684,7 +684,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int AUTH_IA::Timeouter()
 {
 //-----------------------------------------------------------------------------
 int AUTH_IA::Timeouter()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 std::map<uint32_t, IA_USER>::iterator it;
 it = ip2user.begin();
 
 std::map<uint32_t, IA_USER>::iterator it;
 it = ip2user.begin();
@@ -771,7 +771,7 @@ int AUTH_IA::PacketProcessor(void * buff, size_t dataLen, uint32_t sip, uint16_t
 std::string login(user->GetLogin());
 const size_t offset = LOGIN_LEN + 2 + 6; // LOGIN_LEN + sizeOfMagic + sizeOfVer;
 
 std::string login(user->GetLogin());
 const size_t offset = LOGIN_LEN + 2 + 6; // LOGIN_LEN + sizeOfMagic + sizeOfVer;
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::map<uint32_t, IA_USER>::iterator it(ip2user.find(sip));
 
 if (it == ip2user.end())
 std::map<uint32_t, IA_USER>::iterator it(ip2user.find(sip));
 
 if (it == ip2user.end())
@@ -958,7 +958,7 @@ if (!ip)
 
 std::map<uint32_t, IA_USER>::iterator it;
 
 
 std::map<uint32_t, IA_USER>::iterator it;
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 it = ip2user.find(ip);
 if (it == ip2user.end())
     {
 it = ip2user.find(ip);
 if (it == ip2user.end())
     {
@@ -1046,7 +1046,7 @@ printfd(__FILE__, "SendMessage userIP=%s\n", inet_ntostring(ip).c_str());
 
 std::map<uint32_t, IA_USER>::iterator it;
 
 
 std::map<uint32_t, IA_USER>::iterator it;
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 it = ip2user.find(ip);
 if (it == ip2user.end())
     {
 it = ip2user.find(ip);
 if (it == ip2user.end())
     {
index 411acfaff2655302aaec096a260764e046593089..3128324430e939b55f02e58eae8697a65780d2f5 100644 (file)
@@ -12,7 +12,6 @@ LIBS += $(LIB_THREAD)
 
 STGLIBS = common \
          logger \
 
 STGLIBS = common \
          logger \
-         locker \
          scriptexecuter
 
 include ../../Makefile.in
          scriptexecuter
 
 include ../../Makefile.in
index 555ec8b18a5f9ef55ba4fed8563f6698e3e8e627..076443bbd858aa413551d98b6f8cb3d99f4b4e5c 100644 (file)
@@ -6,7 +6,7 @@ include ../../../../../Makefile.conf
 
 PROG = mod_cap_divert.so
 
 
 PROG = mod_cap_divert.so
 
-SRCS = ./divert_cap.cpp 
+SRCS = ./divert_cap.cpp
 
 LIBS += $(LIB_THREAD)
 
 
 LIBS += $(LIB_THREAD)
 
index aeb77636b65b2577a1ee649360ed682108d26981..2b859dbb35abcbd7f585ca3f702e592f253f8b33 100644 (file)
@@ -6,7 +6,7 @@ include ../../../../../Makefile.conf
 
 PROG = mod_cap_bpf.so
 
 
 PROG = mod_cap_bpf.so
 
-SRCS = ./ether_cap.cpp 
+SRCS = ./ether_cap.cpp
 
 LIBS += $(LIB_THREAD)
 
 
 LIBS += $(LIB_THREAD)
 
index b2bdabf6418fa8808cf8777356b2c161041cf469..cbbe79c6b855275b2eca3badeec82eb3b287058c 100644 (file)
@@ -25,7 +25,6 @@ LIBS += -liconv
 endif
 
 STGLIBS = common \
 endif
 
 STGLIBS = common \
-         locker \
          logger \
          scriptexecuter
 
          logger \
          scriptexecuter
 
index 1b59f5cfa844da7c643e85e7318c58771fb01338..f1bf357a7b7f4a4db0b2c273b29b3b6c8156aab2 100644 (file)
@@ -19,7 +19,6 @@ LIBS += -lexpat \
        $(LIB_THREAD)
 
 STGLIBS = common \
        $(LIB_THREAD)
 
 STGLIBS = common \
-         locker \
          logger \
          crypto \
          scriptexecuter
          logger \
          crypto \
          scriptexecuter
index 931c3f4a7512b93f7b04ab55f895e4eb7fb58f97..4edc95293d236323b3e3ec4c547e32fb6e5b0616 100644 (file)
@@ -12,7 +12,6 @@ SRCS = ./ping.cpp
 
 STGLIBS = pinger \
          common \
 
 STGLIBS = pinger \
          common \
-         locker \
          logger \
          scriptexecuter
 
          logger \
          scriptexecuter
 
index 7c4050abb035d9f55108ed306b02d5b51e869a3d..c65a5cbaff805ea9f96f36057e9f277ed63cca5b 100644 (file)
@@ -124,7 +124,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int PING::Stop()
 {
 //-----------------------------------------------------------------------------
 int PING::Stop()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (!isRunning)
     return 0;
 
 if (!isRunning)
     return 0;
@@ -178,7 +178,7 @@ while (ping->nonstop)
     {
     std::list<USER_PTR>::iterator iter = ping->usersList.begin();
         {
     {
     std::list<USER_PTR>::iterator iter = ping->usersList.begin();
         {
-        STG_LOCKER lock(&ping->mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&ping->mutex);
         while (iter != ping->usersList.end())
             {
             if ((*iter)->GetProperty().ips.ConstData().OnlyOneIP())
         while (iter != ping->usersList.end())
             {
             if ((*iter)->GetProperty().ips.ConstData().OnlyOneIP())
@@ -268,7 +268,7 @@ if (IPIter != ChgIPNotifierList.end())
 //-----------------------------------------------------------------------------
 void PING::GetUsers()
 {
 //-----------------------------------------------------------------------------
 void PING::GetUsers()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 USER_PTR u;
 int h = users->OpenSearch();
 
 USER_PTR u;
 int h = users->OpenSearch();
@@ -297,7 +297,7 @@ users->CloseSearch(h);
 //-----------------------------------------------------------------------------
 void PING::AddUser(USER_PTR u)
 {
 //-----------------------------------------------------------------------------
 void PING::AddUser(USER_PTR u)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 SetUserNotifiers(u);
 usersList.push_back(u);
 
 SetUserNotifiers(u);
 usersList.push_back(u);
@@ -305,7 +305,7 @@ usersList.push_back(u);
 //-----------------------------------------------------------------------------
 void PING::DelUser(USER_PTR u)
 {
 //-----------------------------------------------------------------------------
 void PING::DelUser(USER_PTR u)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 UnSetUserNotifiers(u);
 
 
 UnSetUserNotifiers(u);
 
index 06f467ba2f199ae4b891423639c560ffe986288c..62a05183acbb016994b74df5a7e8a34b9c6dbc85 100644 (file)
@@ -13,7 +13,6 @@ SRCS = ./radius.cpp
 STGLIBS = common \
          crypto \
          logger \
 STGLIBS = common \
          crypto \
          logger \
-         locker \
          scriptexecuter
 
 include ../../Makefile.in
          scriptexecuter
 
 include ../../Makefile.in
index f9ba3ba19aa09f9ce638a102f8e60a34368a729e..50922cc109a48f8f900ee67ead89c946bd9c9378 100644 (file)
@@ -13,7 +13,6 @@ SRCS = ./rscript.cpp \
 
 STGLIBS = common \
          crypto \
 
 STGLIBS = common \
          crypto \
-         locker \
          logger \
          scriptexecuter
 
          logger \
          scriptexecuter
 
index e781a8cb91532f3d976a5f9d5fdc478ff7586616..00114df4c501fa0cd4aa6e3d7fc2031d8e7dc3ed 100644 (file)
@@ -313,7 +313,7 @@ if (nrMapParser.ReadFile(rsSettings.GetMapFileName()))
     }
 
     {
     }
 
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
 
     printfd(__FILE__, "REMOTE_SCRIPT::Reload()\n");
 
 
     printfd(__FILE__, "REMOTE_SCRIPT::Reload()\n");
 
@@ -353,7 +353,7 @@ return false;
 //-----------------------------------------------------------------------------
 void REMOTE_SCRIPT::PeriodicSend()
 {
 //-----------------------------------------------------------------------------
 void REMOTE_SCRIPT::PeriodicSend()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 std::map<uint32_t, RS::USER>::iterator it(authorizedUsers.begin());
 while (it != authorizedUsers.end())
 
 std::map<uint32_t, RS::USER>::iterator it(authorizedUsers.begin());
 while (it != authorizedUsers.end())
@@ -510,7 +510,7 @@ return false;
 //-----------------------------------------------------------------------------
 std::vector<uint32_t> REMOTE_SCRIPT::IP2Routers(uint32_t ip)
 {
 //-----------------------------------------------------------------------------
 std::vector<uint32_t> REMOTE_SCRIPT::IP2Routers(uint32_t ip)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 for (size_t i = 0; i < netRouters.size(); ++i)
     {
     if ((ip & netRouters[i].subnetMask) == (netRouters[i].subnetIP & netRouters[i].subnetMask))
 for (size_t i = 0; i < netRouters.size(); ++i)
     {
     if ((ip & netRouters[i].subnetMask) == (netRouters[i].subnetIP & netRouters[i].subnetMask))
@@ -545,13 +545,13 @@ void REMOTE_SCRIPT::AddRSU(USER_PTR user)
 RS::USER rsu(IP2Routers(user->GetCurrIP()), user);
 Send(rsu);
 
 RS::USER rsu(IP2Routers(user->GetCurrIP()), user);
 Send(rsu);
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 authorizedUsers.insert(std::make_pair(user->GetCurrIP(), rsu));
 }
 //-----------------------------------------------------------------------------
 void REMOTE_SCRIPT::DelRSU(USER_PTR user)
 {
 authorizedUsers.insert(std::make_pair(user->GetCurrIP(), rsu));
 }
 //-----------------------------------------------------------------------------
 void REMOTE_SCRIPT::DelRSU(USER_PTR user)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::map<uint32_t, RS::USER>::iterator it(authorizedUsers.begin());
 while (it != authorizedUsers.end())
     {
 std::map<uint32_t, RS::USER>::iterator it(authorizedUsers.begin());
 while (it != authorizedUsers.end())
     {
index 1c875dcd70bf3002d39b68ce82794c35f381ab05..08569e59ba0e88ff860ad7d97c2c955b9e7d0683 100644 (file)
@@ -14,7 +14,6 @@ SRCS =  smux.cpp \
 STGLIBS = common \
          smux \
          logger \
 STGLIBS = common \
          smux \
          logger \
-         locker \
          scriptexecuter
 
 CFLAGS += -I ../../../../../stglibs/smux.lib/include/stg
          scriptexecuter
 
 CFLAGS += -I ../../../../../stglibs/smux.lib/include/stg
index 372a3cd44af4f1a7a2456c4e4c1233b5edc49ce7..c952d8a1e13fcf248afadf9cbe78f134e86b06e5 100644 (file)
@@ -10,7 +10,6 @@ SRCS = ./file_store.cpp
 
 STGLIBS = conffiles \
          common \
 
 STGLIBS = conffiles \
          common \
-         locker \
          logger \
          crypto
 
          logger \
          crypto
 
index bf5d389a87f5f03ec66c9e201a6be3959cc1ce6f..9d66e352f12faed6e2f680d689a356c018855f8c 100644 (file)
@@ -358,7 +358,7 @@ int FILES_STORE::ParseSettings()
 int ret = storeSettings.ParseSettings(settings);
 if (ret)
     {
 int ret = storeSettings.ParseSettings(settings);
 if (ret)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = storeSettings.GetStrError();
     }
 return ret;
     errorStr = storeSettings.GetStrError();
     }
 return ret;
@@ -370,12 +370,12 @@ std::vector<std::string> files;
 
 if (GetFileList(&files, storeSettings.GetUsersDir(), S_IFDIR, ""))
     {
 
 if (GetFileList(&files, storeSettings.GetUsersDir(), S_IFDIR, ""))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Failed to open '" + storeSettings.GetUsersDir() + "': " + std::string(strerror(errno));
     return -1;
     }
 
     errorStr = "Failed to open '" + storeSettings.GetUsersDir() + "': " + std::string(strerror(errno));
     return -1;
     }
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 userList->swap(files);
 
 
 userList->swap(files);
 
@@ -388,12 +388,12 @@ std::vector<std::string> files;
 
 if (GetFileList(&files, storeSettings.GetAdminsDir(), S_IFREG, ".adm"))
     {
 
 if (GetFileList(&files, storeSettings.GetAdminsDir(), S_IFREG, ".adm"))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Failed to open '" + storeSettings.GetAdminsDir() + "': " + std::string(strerror(errno));
     return -1;
     }
 
     errorStr = "Failed to open '" + storeSettings.GetAdminsDir() + "': " + std::string(strerror(errno));
     return -1;
     }
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 adminList->swap(files);
 
 
 adminList->swap(files);
 
@@ -406,12 +406,12 @@ std::vector<std::string> files;
 
 if (GetFileList(&files, storeSettings.GetTariffsDir(), S_IFREG, ".tf"))
     {
 
 if (GetFileList(&files, storeSettings.GetTariffsDir(), S_IFREG, ".tf"))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Failed to open '" + storeSettings.GetTariffsDir() + "': " + std::string(strerror(errno));
     return -1;
     }
 
     errorStr = "Failed to open '" + storeSettings.GetTariffsDir() + "': " + std::string(strerror(errno));
     return -1;
     }
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 tariffList->swap(files);
 
 
 tariffList->swap(files);
 
@@ -448,7 +448,7 @@ while ((entry = readdir(d)))
         {
         if (unlink(str.c_str()))
             {
         {
         if (unlink(str.c_str()))
             {
-            STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+            STG_LOCKER lock(&mutex);
             errorStr = "unlink failed. Message: '";
             errorStr += strerror(errno);
             errorStr += "'";
             errorStr = "unlink failed. Message: '";
             errorStr += strerror(errno);
             errorStr += "'";
@@ -473,7 +473,7 @@ closedir(d);
 
 if (rmdir(path))
     {
 
 if (rmdir(path))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "rmdir failed. Message: '";
     errorStr += strerror(errno);
     errorStr += "'";
     errorStr = "rmdir failed. Message: '";
     errorStr += strerror(errno);
     errorStr += "'";
@@ -492,7 +492,7 @@ strprintf(&fileName, "%s%s", storeSettings.GetUsersDir().c_str(), login.c_str())
 
 if (mkdir(fileName.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == -1)
     {
 
 if (mkdir(fileName.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == -1)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = std::string("mkdir failed. Message: '") + strerror(errno) + "'";
     printfd(__FILE__, "FILES_STORE::AddUser - mkdir failed. Message: '%s'\n", strerror(errno));
     return -1;
     errorStr = std::string("mkdir failed. Message: '") + strerror(errno) + "'";
     printfd(__FILE__, "FILES_STORE::AddUser - mkdir failed. Message: '%s'\n", strerror(errno));
     return -1;
@@ -501,7 +501,7 @@ if (mkdir(fileName.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) ==
 strprintf(&fileName, "%s%s/conf", storeSettings.GetUsersDir().c_str(), login.c_str());
 if (Touch(fileName))
     {
 strprintf(&fileName, "%s%s/conf", storeSettings.GetUsersDir().c_str(), login.c_str());
 if (Touch(fileName))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot create file \"" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::AddUser - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
     errorStr = "Cannot create file \"" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::AddUser - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
@@ -510,7 +510,7 @@ if (Touch(fileName))
 strprintf(&fileName, "%s%s/stat", storeSettings.GetUsersDir().c_str(), login.c_str());
 if (Touch(fileName))
     {
 strprintf(&fileName, "%s%s/stat", storeSettings.GetUsersDir().c_str(), login.c_str());
 if (Touch(fileName))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot create file \"" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::AddUser - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
     errorStr = "Cannot create file \"" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::AddUser - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
@@ -528,7 +528,7 @@ if (access(dirName.c_str(), F_OK) != 0)
     {
     if (mkdir(dirName.c_str(), 0700) != 0)
         {
     {
     if (mkdir(dirName.c_str(), 0700) != 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Directory '" + dirName + "' cannot be created.";
         printfd(__FILE__, "FILES_STORE::DelUser - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
         errorStr = "Directory '" + dirName + "' cannot be created.";
         printfd(__FILE__, "FILES_STORE::DelUser - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
@@ -541,7 +541,7 @@ if (access(dirName.c_str(), F_OK) == 0)
     strprintf(&dirName1, "%s/%s", storeSettings.GetUsersDir().c_str(), login.c_str());
     if (rename(dirName1.c_str(), dirName.c_str()))
         {
     strprintf(&dirName1, "%s/%s", storeSettings.GetUsersDir().c_str(), login.c_str());
     if (rename(dirName1.c_str(), dirName.c_str()))
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Error moving dir from " + dirName1 + " to " + dirName;
         printfd(__FILE__, "FILES_STORE::DelUser - rename failed. Message: '%s'\n", strerror(errno));
         return -1;
         errorStr = "Error moving dir from " + dirName1 + " to " + dirName;
         printfd(__FILE__, "FILES_STORE::DelUser - rename failed. Message: '%s'\n", strerror(errno));
         return -1;
@@ -580,7 +580,7 @@ int e = cf.Error();
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - conf read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' data not read.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - conf read failed for user '%s'\n", login.c_str());
     return -1;
@@ -588,14 +588,14 @@ if (e)
 
 if (cf.ReadString("Password", &conf->password, "") < 0)
     {
 
 if (cf.ReadString("Password", &conf->password, "") < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read. Parameter Password.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - password read failed for user '%s'\n", login.c_str());
     return -1;
     }
 if (conf->password.empty())
     {
     errorStr = "User \'" + login + "\' data not read. Parameter Password.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - password read failed for user '%s'\n", login.c_str());
     return -1;
     }
 if (conf->password.empty())
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' password is blank.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - password is blank for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' password is blank.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - password is blank for user '%s'\n", login.c_str());
     return -1;
@@ -603,14 +603,14 @@ if (conf->password.empty())
 
 if (cf.ReadString("tariff", &conf->tariffName, "") < 0)
     {
 
 if (cf.ReadString("tariff", &conf->tariffName, "") < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read. Parameter Tariff.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - tariff read failed for user '%s'\n", login.c_str());
     return -1;
     }
 if (conf->tariffName.empty())
     {
     errorStr = "User \'" + login + "\' data not read. Parameter Tariff.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - tariff read failed for user '%s'\n", login.c_str());
     return -1;
     }
 if (conf->tariffName.empty())
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' tariff is blank.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - tariff is blank for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' tariff is blank.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - tariff is blank for user '%s'\n", login.c_str());
     return -1;
@@ -625,7 +625,7 @@ try
     }
 catch (const std::string & s)
     {
     }
 catch (const std::string & s)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read. Parameter IP address. " + s;
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - ip read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' data not read. Parameter IP address. " + s;
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - ip read failed for user '%s'\n", login.c_str());
     return -1;
@@ -634,7 +634,7 @@ conf->ips = ips;
 
 if (cf.ReadInt("alwaysOnline", &conf->alwaysOnline, 0) != 0)
     {
 
 if (cf.ReadInt("alwaysOnline", &conf->alwaysOnline, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read. Parameter AlwaysOnline.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - alwaysonline read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' data not read. Parameter AlwaysOnline.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - alwaysonline read failed for user '%s'\n", login.c_str());
     return -1;
@@ -642,7 +642,7 @@ if (cf.ReadInt("alwaysOnline", &conf->alwaysOnline, 0) != 0)
 
 if (cf.ReadInt("down", &conf->disabled, 0) != 0)
     {
 
 if (cf.ReadInt("down", &conf->disabled, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read. Parameter Down.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - down read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' data not read. Parameter Down.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - down read failed for user '%s'\n", login.c_str());
     return -1;
@@ -650,7 +650,7 @@ if (cf.ReadInt("down", &conf->disabled, 0) != 0)
 
 if (cf.ReadInt("passive", &conf->passive, 0) != 0)
     {
 
 if (cf.ReadInt("passive", &conf->passive, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read. Parameter Passive.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - passive read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' data not read. Parameter Passive.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - passive read failed for user '%s'\n", login.c_str());
     return -1;
@@ -675,7 +675,7 @@ for (int i = 0; i < USERDATA_NUM; i++)
 
 if (cf.ReadDouble("Credit", &conf->credit, 0) != 0)
     {
 
 if (cf.ReadDouble("Credit", &conf->credit, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' data not read. Parameter Credit.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - credit read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' data not read. Parameter Credit.";
     printfd(__FILE__, "FILES_STORE::RestoreUserConf - credit read failed for user '%s'\n", login.c_str());
     return -1;
@@ -708,7 +708,7 @@ int e = cf.Error();
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "User \'" + login + "\' stat not read. Cannot open file " + fileName + ".";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - stat read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "User \'" + login + "\' stat not read. Cannot open file " + fileName + ".";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - stat read failed for user '%s'\n", login.c_str());
     return -1;
@@ -722,7 +722,7 @@ for (int i = 0; i < DIR_NUM; i++)
     snprintf(s, 22, "D%d", i);
     if (cf.ReadULongLongInt(s, &traff, 0) != 0)
         {
     snprintf(s, 22, "D%d", i);
     if (cf.ReadULongLongInt(s, &traff, 0) != 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "User \'" + login + "\' stat not read. Parameter " + std::string(s);
         printfd(__FILE__, "FILES_STORE::RestoreUserStat - download stat read failed for user '%s'\n", login.c_str());
         return -1;
         errorStr = "User \'" + login + "\' stat not read. Parameter " + std::string(s);
         printfd(__FILE__, "FILES_STORE::RestoreUserStat - download stat read failed for user '%s'\n", login.c_str());
         return -1;
@@ -732,7 +732,7 @@ for (int i = 0; i < DIR_NUM; i++)
     snprintf(s, 22, "U%d", i);
     if (cf.ReadULongLongInt(s, &traff, 0) != 0)
         {
     snprintf(s, 22, "U%d", i);
     if (cf.ReadULongLongInt(s, &traff, 0) != 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr =   "User \'" + login + "\' stat not read. Parameter " + std::string(s);
         printfd(__FILE__, "FILES_STORE::RestoreUserStat - upload stat read failed for user '%s'\n", login.c_str());
         return -1;
         errorStr =   "User \'" + login + "\' stat not read. Parameter " + std::string(s);
         printfd(__FILE__, "FILES_STORE::RestoreUserStat - upload stat read failed for user '%s'\n", login.c_str());
         return -1;
@@ -742,7 +742,7 @@ for (int i = 0; i < DIR_NUM; i++)
 
 if (cf.ReadDouble("Cash", &stat->cash, 0) != 0)
     {
 
 if (cf.ReadDouble("Cash", &stat->cash, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr =   "User \'" + login + "\' stat not read. Parameter Cash";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - cash read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr =   "User \'" + login + "\' stat not read. Parameter Cash";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - cash read failed for user '%s'\n", login.c_str());
     return -1;
@@ -750,7 +750,7 @@ if (cf.ReadDouble("Cash", &stat->cash, 0) != 0)
 
 if (cf.ReadDouble("FreeMb", &stat->freeMb, 0) != 0)
     {
 
 if (cf.ReadDouble("FreeMb", &stat->freeMb, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr =   "User \'" + login + "\' stat not read. Parameter FreeMb";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - freemb read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr =   "User \'" + login + "\' stat not read. Parameter FreeMb";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - freemb read failed for user '%s'\n", login.c_str());
     return -1;
@@ -758,7 +758,7 @@ if (cf.ReadDouble("FreeMb", &stat->freeMb, 0) != 0)
 
 if (cf.ReadTime("LastCashAddTime", &stat->lastCashAddTime, 0) != 0)
     {
 
 if (cf.ReadTime("LastCashAddTime", &stat->lastCashAddTime, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr =   "User \'" + login + "\' stat not read. Parameter LastCashAddTime";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - lastcashaddtime read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr =   "User \'" + login + "\' stat not read. Parameter LastCashAddTime";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - lastcashaddtime read failed for user '%s'\n", login.c_str());
     return -1;
@@ -766,7 +766,7 @@ if (cf.ReadTime("LastCashAddTime", &stat->lastCashAddTime, 0) != 0)
 
 if (cf.ReadTime("PassiveTime", &stat->passiveTime, 0) != 0)
     {
 
 if (cf.ReadTime("PassiveTime", &stat->passiveTime, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr =   "User \'" + login + "\' stat not read. Parameter PassiveTime";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - passivetime read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr =   "User \'" + login + "\' stat not read. Parameter PassiveTime";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - passivetime read failed for user '%s'\n", login.c_str());
     return -1;
@@ -774,7 +774,7 @@ if (cf.ReadTime("PassiveTime", &stat->passiveTime, 0) != 0)
 
 if (cf.ReadDouble("LastCashAdd", &stat->lastCashAdd, 0) != 0)
     {
 
 if (cf.ReadDouble("LastCashAdd", &stat->lastCashAdd, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr =   "User \'" + login + "\' stat not read. Parameter LastCashAdd";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - lastcashadd read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr =   "User \'" + login + "\' stat not read. Parameter LastCashAdd";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - lastcashadd read failed for user '%s'\n", login.c_str());
     return -1;
@@ -782,7 +782,7 @@ if (cf.ReadDouble("LastCashAdd", &stat->lastCashAdd, 0) != 0)
 
 if (cf.ReadTime("LastActivityTime", &stat->lastActivityTime, 0) != 0)
     {
 
 if (cf.ReadTime("LastActivityTime", &stat->lastActivityTime, 0) != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr =   "User \'" + login + "\' stat not read. Parameter LastActivityTime";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - lastactivitytime read failed for user '%s'\n", login.c_str());
     return -1;
     errorStr =   "User \'" + login + "\' stat not read. Parameter LastActivityTime";
     printfd(__FILE__, "FILES_STORE::RestoreUserStat - lastactivitytime read failed for user '%s'\n", login.c_str());
     return -1;
@@ -802,7 +802,7 @@ int e = cfstat.Error();
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = std::string("User \'") + login + "\' conf not written\n";
     printfd(__FILE__, "FILES_STORE::SaveUserConf - conf write failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = std::string("User \'") + login + "\' conf not written\n";
     printfd(__FILE__, "FILES_STORE::SaveUserConf - conf write failed for user '%s'\n", login.c_str());
     return -1;
@@ -813,7 +813,7 @@ e += chown(fileName.c_str(), storeSettings.GetConfUID(), storeSettings.GetConfGI
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::SaveUserConf - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::SaveUserConf - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -858,7 +858,7 @@ fileName = storeSettings.GetUsersDir() + "/" + login + "/stat";
 
     if (e)
         {
 
     if (e)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = std::string("User \'") + login + "\' stat not written\n";
         printfd(__FILE__, "FILES_STORE::SaveUserStat - stat write failed for user '%s'\n", login.c_str());
         return -1;
         errorStr = std::string("User \'") + login + "\' stat not written\n";
         printfd(__FILE__, "FILES_STORE::SaveUserStat - stat write failed for user '%s'\n", login.c_str());
         return -1;
@@ -886,7 +886,7 @@ e += chown(fileName.c_str(), storeSettings.GetStatUID(), storeSettings.GetStatGI
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::SaveUserStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::SaveUserStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -911,7 +911,7 @@ if (f)
     }
 else
     {
     }
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot open \'" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::WriteLogString - log write failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "Cannot open \'" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::WriteLogString - log write failed for user '%s'\n", login.c_str());
     return -1;
@@ -922,7 +922,7 @@ e += chown(fileName.c_str(), storeSettings.GetLogUID(), storeSettings.GetLogGID(
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::WriteLogString - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::WriteLogString - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -947,7 +947,7 @@ if (f)
     }
 else
     {
     }
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot open \'" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::WriteLogString - log write failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "Cannot open \'" + fileName + "\'";
     printfd(__FILE__, "FILES_STORE::WriteLogString - log write failed for user '%s'\n", login.c_str());
     return -1;
@@ -958,7 +958,7 @@ e += chown(fileName.c_str(), storeSettings.GetLogUID(), storeSettings.GetLogGID(
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::WriteLogString - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::WriteLogString - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -1035,7 +1035,7 @@ CONFIGFILE s(stat1, true);
 
 if (s.Error())
     {
 
 if (s.Error())
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot create file '" + stat1 + "'";
     printfd(__FILE__, "FILES_STORE::SaveMonthStat - month stat write failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "Cannot create file '" + stat1 + "'";
     printfd(__FILE__, "FILES_STORE::SaveMonthStat - month stat write failed for user '%s'\n", login.c_str());
     return -1;
@@ -1050,7 +1050,7 @@ CONFIGFILE s2(stat2, true);
 
 if (s2.Error())
     {
 
 if (s2.Error())
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot create file '" + stat2 + "'";
     printfd(__FILE__, "FILES_STORE::SaveMonthStat - month stat write failed for user '%s'\n", login.c_str());
     return -1;
     errorStr = "Cannot create file '" + stat2 + "'";
     printfd(__FILE__, "FILES_STORE::SaveMonthStat - month stat write failed for user '%s'\n", login.c_str());
     return -1;
@@ -1088,7 +1088,7 @@ strprintf(&fileName, "%s/%s.adm", storeSettings.GetAdminsDir().c_str(), login.c_
 
 if (Touch(fileName))
     {
 
 if (Touch(fileName))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot create file " + fileName;
     printfd(__FILE__, "FILES_STORE::AddAdmin - failed to add admin '%s'\n", login.c_str());
     return -1;
     errorStr = "Cannot create file " + fileName;
     printfd(__FILE__, "FILES_STORE::AddAdmin - failed to add admin '%s'\n", login.c_str());
     return -1;
@@ -1103,7 +1103,7 @@ std::string fileName;
 strprintf(&fileName, "%s/%s.adm", storeSettings.GetAdminsDir().c_str(), login.c_str());
 if (unlink(fileName.c_str()))
     {
 strprintf(&fileName, "%s/%s.adm", storeSettings.GetAdminsDir().c_str(), login.c_str());
 if (unlink(fileName.c_str()))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "unlink failed. Message: '";
     errorStr += strerror(errno);
     errorStr += "'";
     errorStr = "unlink failed. Message: '";
     errorStr += strerror(errno);
     errorStr += "'";
@@ -1125,7 +1125,7 @@ strprintf(&fileName, "%s/%s.adm", storeSettings.GetAdminsDir().c_str(), ac.login
 
     if (e)
         {
 
     if (e)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot write admin " + ac.login + ". " + fileName;
         printfd(__FILE__, "FILES_STORE::SaveAdmin - failed to save admin '%s'\n", ac.login.c_str());
         return -1;
         errorStr = "Cannot write admin " + ac.login + ". " + fileName;
         printfd(__FILE__, "FILES_STORE::SaveAdmin - failed to save admin '%s'\n", ac.login.c_str());
         return -1;
@@ -1181,7 +1181,7 @@ std::string p;
 
 if (cf.Error())
     {
 
 if (cf.Error())
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot open " + fileName;
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - failed to restore admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Cannot open " + fileName;
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - failed to restore admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1189,7 +1189,7 @@ if (cf.Error())
 
 if (cf.ReadString("password", &p, "*"))
     {
 
 if (cf.ReadString("password", &p, "*"))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter password";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - password read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter password";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - password read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1223,7 +1223,7 @@ if (cf.ReadUShortInt("ChgConf", &a, 0) == 0)
     ac->priv.userConf = a;
 else
     {
     ac->priv.userConf = a;
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter ChgConf";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgconf read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter ChgConf";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgconf read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1233,7 +1233,7 @@ if (cf.ReadUShortInt("ChgPassword", &a, 0) == 0)
     ac->priv.userPasswd = a;
 else
     {
     ac->priv.userPasswd = a;
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter ChgPassword";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgpassword read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter ChgPassword";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgpassword read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1243,7 +1243,7 @@ if (cf.ReadUShortInt("ChgStat", &a, 0) == 0)
     ac->priv.userStat = a;
 else
     {
     ac->priv.userStat = a;
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter ChgStat";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgstat read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter ChgStat";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgstat read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1253,7 +1253,7 @@ if (cf.ReadUShortInt("ChgCash", &a, 0) == 0)
     ac->priv.userCash = a;
 else
     {
     ac->priv.userCash = a;
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter ChgCash";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgcash read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter ChgCash";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgcash read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1263,7 +1263,7 @@ if (cf.ReadUShortInt("UsrAddDel", &a, 0) == 0)
     ac->priv.userAddDel = a;
 else
     {
     ac->priv.userAddDel = a;
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter UsrAddDel";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - usradddel read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter UsrAddDel";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - usradddel read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1273,7 +1273,7 @@ if (cf.ReadUShortInt("ChgAdmin", &a, 0) == 0)
     ac->priv.adminChg = a;
 else
     {
     ac->priv.adminChg = a;
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter ChgAdmin";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgadmin read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter ChgAdmin";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgadmin read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1283,7 +1283,7 @@ if (cf.ReadUShortInt("ChgTariff", &a, 0) == 0)
     ac->priv.tariffChg = a;
 else
     {
     ac->priv.tariffChg = a;
 else
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error in parameter ChgTariff";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgtariff read failed for admin '%s'\n", ac->login.c_str());
     return -1;
     errorStr = "Error in parameter ChgTariff";
     printfd(__FILE__, "FILES_STORE::RestoreAdmin - chgtariff read failed for admin '%s'\n", ac->login.c_str());
     return -1;
@@ -1308,7 +1308,7 @@ std::string fileName;
 strprintf(&fileName, "%s/%s.tf", storeSettings.GetTariffsDir().c_str(), name.c_str());
 if (Touch(fileName))
     {
 strprintf(&fileName, "%s/%s.tf", storeSettings.GetTariffsDir().c_str(), name.c_str());
 if (Touch(fileName))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot create file " + fileName;
     printfd(__FILE__, "FILES_STORE::AddTariff - failed to add tariff '%s'\n", name.c_str());
     return -1;
     errorStr = "Cannot create file " + fileName;
     printfd(__FILE__, "FILES_STORE::AddTariff - failed to add tariff '%s'\n", name.c_str());
     return -1;
@@ -1322,7 +1322,7 @@ std::string fileName;
 strprintf(&fileName, "%s/%s.tf", storeSettings.GetTariffsDir().c_str(), name.c_str());
 if (unlink(fileName.c_str()))
     {
 strprintf(&fileName, "%s/%s.tf", storeSettings.GetTariffsDir().c_str(), name.c_str());
 if (unlink(fileName.c_str()))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "unlink failed. Message: '";
     errorStr += strerror(errno);
     errorStr += "'";
     errorStr = "unlink failed. Message: '";
     errorStr += strerror(errno);
     errorStr += "'";
@@ -1340,7 +1340,7 @@ td->tariffConf.name = tariffName;
 
 if (conf.Error() != 0)
     {
 
 if (conf.Error() != 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot read file " + fileName;
     printfd(__FILE__, "FILES_STORE::RestoreTariff - failed to read tariff '%s'\n", tariffName.c_str());
     return -1;
     errorStr = "Cannot read file " + fileName;
     printfd(__FILE__, "FILES_STORE::RestoreTariff - failed to read tariff '%s'\n", tariffName.c_str());
     return -1;
@@ -1352,7 +1352,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "Time%d", i);
     if (conf.ReadString(param, &str, "00:00-00:00") < 0)
         {
     strprintf(&param, "Time%d", i);
     if (conf.ReadString(param, &str, "00:00-00:00") < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - time%d read failed for tariff '%s'\n", i, tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - time%d read failed for tariff '%s'\n", i, tariffName.c_str());
         return -1;
@@ -1367,7 +1367,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "PriceDayA%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceDayA, 0.0) < 0)
         {
     strprintf(&param, "PriceDayA%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceDayA, 0.0) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricedaya read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricedaya read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
@@ -1377,7 +1377,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "PriceDayB%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceDayB, 0.0) < 0)
         {
     strprintf(&param, "PriceDayB%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceDayB, 0.0) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricedayb read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricedayb read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
@@ -1387,7 +1387,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "PriceNightA%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceNightA, 0.0) < 0)
         {
     strprintf(&param, "PriceNightA%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceNightA, 0.0) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricenighta read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricenighta read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
@@ -1397,7 +1397,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "PriceNightB%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceNightB, 0.0) < 0)
         {
     strprintf(&param, "PriceNightB%d", i);
     if (conf.ReadDouble(param, &td->dirPrice[i].priceNightB, 0.0) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricenightb read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - pricenightb read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
@@ -1407,7 +1407,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "Threshold%d", i);
     if (conf.ReadInt(param, &td->dirPrice[i].threshold, 0) < 0)
         {
     strprintf(&param, "Threshold%d", i);
     if (conf.ReadInt(param, &td->dirPrice[i].threshold, 0) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - threshold read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - threshold read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
@@ -1416,7 +1416,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "SinglePrice%d", i);
     if (conf.ReadInt(param, &td->dirPrice[i].singlePrice, 0) < 0)
         {
     strprintf(&param, "SinglePrice%d", i);
     if (conf.ReadInt(param, &td->dirPrice[i].singlePrice, 0) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - singleprice read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - singleprice read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
@@ -1425,7 +1425,7 @@ for (int i = 0; i<DIR_NUM; i++)
     strprintf(&param, "NoDiscount%d", i);
     if (conf.ReadInt(param, &td->dirPrice[i].noDiscount, 0) < 0)
         {
     strprintf(&param, "NoDiscount%d", i);
     if (conf.ReadInt(param, &td->dirPrice[i].noDiscount, 0) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - nodiscount read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
         errorStr = "Cannot read tariff " + tariffName + ". Parameter " + param;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - nodiscount read failed for tariff '%s'\n", tariffName.c_str());
         return -1;
@@ -1434,7 +1434,7 @@ for (int i = 0; i<DIR_NUM; i++)
 
 if (conf.ReadDouble("Fee", &td->tariffConf.fee, 0) < 0)
     {
 
 if (conf.ReadDouble("Fee", &td->tariffConf.fee, 0) < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot read tariff " + tariffName + ". Parameter Fee";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - fee read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
     errorStr = "Cannot read tariff " + tariffName + ". Parameter Fee";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - fee read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
@@ -1442,7 +1442,7 @@ if (conf.ReadDouble("Fee", &td->tariffConf.fee, 0) < 0)
 
 if (conf.ReadDouble("Free", &td->tariffConf.free, 0) < 0)
     {
 
 if (conf.ReadDouble("Free", &td->tariffConf.free, 0) < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot read tariff " + tariffName + ". Parameter Free";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - free read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
     errorStr = "Cannot read tariff " + tariffName + ". Parameter Free";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - free read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
@@ -1450,7 +1450,7 @@ if (conf.ReadDouble("Free", &td->tariffConf.free, 0) < 0)
 
 if (conf.ReadDouble("PassiveCost", &td->tariffConf.passiveCost, 0) < 0)
     {
 
 if (conf.ReadDouble("PassiveCost", &td->tariffConf.passiveCost, 0) < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot read tariff " + tariffName + ". Parameter PassiveCost";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - passivecost read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
     errorStr = "Cannot read tariff " + tariffName + ". Parameter PassiveCost";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - passivecost read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
@@ -1458,7 +1458,7 @@ if (conf.ReadDouble("PassiveCost", &td->tariffConf.passiveCost, 0) < 0)
 
 if (conf.ReadString("TraffType", &str, "") < 0)
     {
 
 if (conf.ReadString("TraffType", &str, "") < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Cannot read tariff " + tariffName + ". Parameter TraffType";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - trafftype read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
     errorStr = "Cannot read tariff " + tariffName + ". Parameter TraffType";
     printfd(__FILE__, "FILES_STORE::RestoreTariff - trafftype read failed for tariff '%s'\n", tariffName.c_str());
     return -1;
@@ -1477,7 +1477,7 @@ else
                 td->tariffConf.traffType = TRAFF_MAX;
             else
                 {
                 td->tariffConf.traffType = TRAFF_MAX;
             else
                 {
-                STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+                STG_LOCKER lock(&mutex);
                 errorStr = "Cannot read tariff " + tariffName + ". Parameter TraffType incorrect";
                 printfd(__FILE__, "FILES_STORE::RestoreTariff - invalid trafftype for tariff '%s'\n", tariffName.c_str());
                 return -1;
                 errorStr = "Cannot read tariff " + tariffName + ". Parameter TraffType incorrect";
                 printfd(__FILE__, "FILES_STORE::RestoreTariff - invalid trafftype for tariff '%s'\n", tariffName.c_str());
                 return -1;
@@ -1501,7 +1501,7 @@ std::string fileName = storeSettings.GetTariffsDir() + "/" + tariffName + ".tf";
 
     if (e)
         {
 
     if (e)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Error writing tariff " + tariffName;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - failed to save tariff '%s'\n", tariffName.c_str());
         return e;
         errorStr = "Error writing tariff " + tariffName;
         printfd(__FILE__, "FILES_STORE::RestoreTariff - failed to save tariff '%s'\n", tariffName.c_str());
         return e;
@@ -1586,7 +1586,7 @@ if (access(dn, F_OK) != 0)
     {
     if (mkdir(dn, 0700) != 0)
         {
     {
     if (mkdir(dn, 0700) != 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Directory \'" + std::string(dn) + "\' cannot be created.";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
         errorStr = "Directory \'" + std::string(dn) + "\' cannot be created.";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
@@ -1598,7 +1598,7 @@ e += chmod(dn, storeSettings.GetStatModeDir());
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -1619,7 +1619,7 @@ if (access(dn, F_OK) != 0)
     {
     if (mkdir(dn, 0700) != 0)
         {
     {
     if (mkdir(dn, 0700) != 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Directory \'" + std::string(dn) + "\' cannot be created.";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
         errorStr = "Directory \'" + std::string(dn) + "\' cannot be created.";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
@@ -1631,7 +1631,7 @@ e += chmod(dn, storeSettings.GetStatModeDir());
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -1645,7 +1645,7 @@ if (access(dn, F_OK) != 0)
     {
     if (mkdir(dn, 0700) != 0)
         {
     {
     if (mkdir(dn, 0700) != 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Directory \'" + std::string(dn) + "\' cannot be created.";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
         errorStr = "Directory \'" + std::string(dn) + "\' cannot be created.";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - mkdir failed. Message: '%s'\n", strerror(errno));
         return -1;
@@ -1657,7 +1657,7 @@ e += chmod(dn, storeSettings.GetStatModeDir());
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -1667,7 +1667,7 @@ statFile = fopen (fn, "at");
 
 if (!statFile)
     {
 
 if (!statFile)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "File \'" + std::string(fn) + "\' cannot be written.";
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
     errorStr = "File \'" + std::string(fn) + "\' cannot be written.";
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
@@ -1694,7 +1694,7 @@ s2 = lt2->tm_sec;
 if (fprintf(statFile, "-> %02d.%02d.%02d - %02d.%02d.%02d\n",
             h1, m1, s1, h2, m2, s2) < 0)
     {
 if (fprintf(statFile, "-> %02d.%02d.%02d - %02d.%02d.%02d\n",
             h1, m1, s1, h2, m2, s2) < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = std::string("fprint failed. Message: '") + strerror(errno) + "'";
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
     fclose(statFile);
     errorStr = std::string("fprint failed. Message: '") + strerror(errno) + "'";
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
     fclose(statFile);
@@ -1718,7 +1718,7 @@ while (stIter != statTree.end())
                 u.c_str(),
                 stIter->second.cash) < 0)
         {
                 u.c_str(),
                 stIter->second.cash) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "fprint failed. Message: '";
         errorStr += strerror(errno);
         errorStr += "'";
         errorStr = "fprint failed. Message: '";
         errorStr += strerror(errno);
         errorStr += "'";
@@ -1734,7 +1734,7 @@ while (stIter != statTree.end())
                 u.c_str(),
                 stIter->second.cash) < 0)
         {
                 u.c_str(),
                 stIter->second.cash) < 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = std::string("fprint failed. Message: '");
         errorStr += strerror(errno);
         errorStr += "'";
         errorStr = std::string("fprint failed. Message: '");
         errorStr += strerror(errno);
         errorStr += "'";
@@ -1754,7 +1754,7 @@ e += chmod(fn, storeSettings.GetStatMode());
 
 if (e)
     {
 
 if (e)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
     printfd(__FILE__, "FILES_STORE::WriteDetailStat - chmod/chown failed for user '%s'. Error: '%s'\n", login.c_str(), strerror(errno));
     }
 
@@ -1772,7 +1772,7 @@ if (access(dn.c_str(), F_OK) != 0)
     {
     if (mkdir(dn.c_str(), 0700) != 0)
         {
     {
     if (mkdir(dn.c_str(), 0700) != 0)
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Directory \'";
         errorStr += dn;
         errorStr += "\' cannot be created.";
         errorStr = "Directory \'";
         errorStr += dn;
         errorStr += "\' cannot be created.";
@@ -1790,7 +1790,7 @@ strprintf(&fn, "%s/%lld", dn.c_str(), msg->header.id);
 
 if (Touch(fn))
     {
 
 if (Touch(fn))
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "File \'";
     errorStr += fn;
     errorStr += "\' cannot be writen.";
     errorStr = "File \'";
     errorStr += fn;
     errorStr += "\' cannot be writen.";
@@ -1812,7 +1812,7 @@ if (access(fileName.c_str(), F_OK) != 0)
     {
     std::string idstr;
     x2str(msg.header.id, idstr);
     {
     std::string idstr;
     x2str(msg.header.id, idstr);
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Message for user \'";
     errorStr += login + "\' with ID \'";
     errorStr += idstr + "\' does not exist.";
     errorStr = "Message for user \'";
     errorStr += login + "\' with ID \'";
     errorStr += idstr + "\' does not exist.";
@@ -1825,7 +1825,7 @@ Touch(fileName + ".new");
 msgFile = fopen((fileName + ".new").c_str(), "wt");
 if (!msgFile)
     {
 msgFile = fopen((fileName + ".new").c_str(), "wt");
 if (!msgFile)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "File \'" + fileName + "\' cannot be writen.";
     printfd(__FILE__, "FILES_STORE::EditMessage - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
     errorStr = "File \'" + fileName + "\' cannot be writen.";
     printfd(__FILE__, "FILES_STORE::EditMessage - fopen failed. Message: '%s'\n", strerror(errno));
     return -1;
@@ -1842,7 +1842,7 @@ res &= (fprintf(msgFile, "%s", msg.text.c_str()) >= 0);
 
 if (!res)
     {
 
 if (!res)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = std::string("fprintf failed. Message: '") + strerror(errno) + "'";
     printfd(__FILE__, "FILES_STORE::EditMessage - fprintf failed. Message: '%s'\n", strerror(errno));
     fclose(msgFile);
     errorStr = std::string("fprintf failed. Message: '") + strerror(errno) + "'";
     printfd(__FILE__, "FILES_STORE::EditMessage - fprintf failed. Message: '%s'\n", strerror(errno));
     fclose(msgFile);
@@ -1855,7 +1855,7 @@ chmod((fileName + ".new").c_str(), storeSettings.GetConfMode());
 
 if (rename((fileName + ".new").c_str(), fileName.c_str()) < 0)
     {
 
 if (rename((fileName + ".new").c_str(), fileName.c_str()) < 0)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "Error moving dir from " + fileName + ".new to " + fileName;
     printfd(__FILE__, "FILES_STORE::EditMessage - rename failed. Message: '%s'\n", strerror(errno));
     return -1;
     errorStr = "Error moving dir from " + fileName + ".new to " + fileName;
     printfd(__FILE__, "FILES_STORE::EditMessage - rename failed. Message: '%s'\n", strerror(errno));
     return -1;
@@ -1900,7 +1900,7 @@ for (unsigned i = 0; i < messages.size(); i++)
         {
         if (unlink((dn + messages[i]).c_str()))
             {
         {
         if (unlink((dn + messages[i]).c_str()))
             {
-            STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+            STG_LOCKER lock(&mutex);
             errorStr = std::string("unlink failed. Message: '") + strerror(errno) + "'";
             printfd(__FILE__, "FILES_STORE::GetMessageHdrs - unlink failed. Message: '%s'\n", strerror(errno));
             return -1;
             errorStr = std::string("unlink failed. Message: '") + strerror(errno) + "'";
             printfd(__FILE__, "FILES_STORE::GetMessageHdrs - unlink failed. Message: '%s'\n", strerror(errno));
             return -1;
@@ -1918,7 +1918,7 @@ for (unsigned i = 0; i < messages.size(); i++)
         {
         if (unlink((dn + messages[i]).c_str()))
             {
         {
         if (unlink((dn + messages[i]).c_str()))
             {
-            STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+            STG_LOCKER lock(&mutex);
             errorStr = std::string("unlink failed. Message: '") + strerror(errno) + "'";
             printfd(__FILE__, "FILES_STORE::GetMessageHdrs - unlink failed. Message: '%s'\n", strerror(errno));
             return -1;
             errorStr = std::string("unlink failed. Message: '") + strerror(errno) + "'";
             printfd(__FILE__, "FILES_STORE::GetMessageHdrs - unlink failed. Message: '%s'\n", strerror(errno));
             return -1;
@@ -1940,7 +1940,7 @@ FILE * msgFile;
 msgFile = fopen(fileName.c_str(), "rt");
 if (!msgFile)
     {
 msgFile = fopen(fileName.c_str(), "rt");
 if (!msgFile)
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     errorStr = "File \'";
     errorStr += fileName;
     errorStr += "\' cannot be openned.";
     errorStr = "File \'";
     errorStr += fileName;
     errorStr += "\' cannot be openned.";
@@ -1961,7 +1961,7 @@ memset(p, 0, sizeof(p));
 for (int pos = 0; pos < 6; pos++)
     {
     if (fgets(p, sizeof(p) - 1, msgFile) == NULL) {
 for (int pos = 0; pos < 6; pos++)
     {
     if (fgets(p, sizeof(p) - 1, msgFile) == NULL) {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read file \'";
         errorStr += fileName;
         errorStr += "\'. Missing data.";
         errorStr = "Cannot read file \'";
         errorStr += fileName;
         errorStr += "\'. Missing data.";
@@ -1979,7 +1979,7 @@ for (int pos = 0; pos < 6; pos++)
 
     if (feof(msgFile))
         {
 
     if (feof(msgFile))
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read file \'";
         errorStr += fileName;
         errorStr += "\'. Missing data.";
         errorStr = "Cannot read file \'";
         errorStr += fileName;
         errorStr += "\'. Missing data.";
@@ -1991,7 +1991,7 @@ for (int pos = 0; pos < 6; pos++)
 
     if (str2x(p, *(d[pos])))
         {
 
     if (str2x(p, *(d[pos])))
         {
-        STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+        STG_LOCKER lock(&mutex);
         errorStr = "Cannot read file \'";
         errorStr += fileName;
         errorStr += "\'. Incorrect value. \'";
         errorStr = "Cannot read file \'";
         errorStr += fileName;
         errorStr += "\'. Incorrect value. \'";
index 0e669751c6157a5f481f28ce7330f99c3174e251..a6fb9ccd38bbf7fec708ab0dca2b99a0ae6ca07b 100644 (file)
@@ -19,7 +19,6 @@ SRCS =        ./firebird_store.cpp \
 
 STGLIBS = ibpp \
          common \
 
 STGLIBS = ibpp \
          common \
-         locker \
          logger \
          crypto
 
          logger \
          crypto
 
index 25a2bf51af59b9f919b76a90e80e8d8c74605f4c..ae0b9e6d1815b14f7ea39a70cdc37093462c2062 100644 (file)
@@ -40,7 +40,7 @@ using namespace std;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetAdminsList(vector<string> * adminsList) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetAdminsList(vector<string> * adminsList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -72,7 +72,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveAdmin(const ADMIN_CONF & ac) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveAdmin(const ADMIN_CONF & ac) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -130,7 +130,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::RestoreAdmin(ADMIN_CONF * ac, const string & login) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::RestoreAdmin(ADMIN_CONF * ac, const string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -193,7 +193,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddAdmin(const string & login) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddAdmin(const string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -231,7 +231,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelAdmin(const string & login) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelAdmin(const string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
index 6b457de02603b90690a728998bb36196585dc1e8..6c4838803886ad162de817d20af7d4a7224b4cb4 100644 (file)
@@ -32,7 +32,7 @@
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetCorpsList(std::vector<std::string> * corpsList) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetCorpsList(std::vector<std::string> * corpsList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -64,7 +64,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveCorp(const CORP_CONF & cc) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveCorp(const CORP_CONF & cc) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -92,7 +92,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::RestoreCorp(CORP_CONF * cc, const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::RestoreCorp(CORP_CONF * cc, const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -130,7 +130,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddCorp(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddCorp(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -157,7 +157,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelCorp(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelCorp(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
index e14ad356e9f6c46938dcb3db57d94827a48c031c..5f9e62bd476d73cfa34fc904fe4698b67342dc69 100644 (file)
@@ -33,7 +33,7 @@
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddMessage(STG_MSG * msg, const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddMessage(STG_MSG * msg, const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -70,7 +70,7 @@ return 0;
 int FIREBIRD_STORE::EditMessage(const STG_MSG & msg,
                                 const std::string & login) const
 {
 int FIREBIRD_STORE::EditMessage(const STG_MSG & msg,
                                 const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -108,7 +108,7 @@ int FIREBIRD_STORE::GetMessage(uint64_t id,
                                STG_MSG * msg,
                                const std::string &) const
 {
                                STG_MSG * msg,
                                const std::string &) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -154,7 +154,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelMessage(uint64_t id, const std::string &) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelMessage(uint64_t id, const std::string &) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -182,7 +182,7 @@ return 0;
 int FIREBIRD_STORE::GetMessageHdrs(std::vector<STG_MSG_HDR> * hdrsList,
                                    const std::string & login) const
 {
 int FIREBIRD_STORE::GetMessageHdrs(std::vector<STG_MSG_HDR> * hdrsList,
                                    const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
index 6f6bee30a01d51b1779afdcc1fe7cb98321e0144..93b7c745fcdf073169e2a387feb3dfce5baad17f 100644 (file)
@@ -33,7 +33,7 @@
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetServicesList(std::vector<std::string> * servicesList) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetServicesList(std::vector<std::string> * servicesList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -65,7 +65,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveService(const SERVICE_CONF & sc) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveService(const SERVICE_CONF & sc) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -100,7 +100,7 @@ return 0;
 int FIREBIRD_STORE::RestoreService(SERVICE_CONF * sc,
                                    const std::string & name) const
 {
 int FIREBIRD_STORE::RestoreService(SERVICE_CONF * sc,
                                    const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -142,7 +142,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddService(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddService(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -170,7 +170,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelService(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelService(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
index 8fd23569dcacb26c4f4fae3e70631373b24dcc40..f757d0553896865ebcbda52ea69d484e64c0316b 100644 (file)
@@ -34,7 +34,7 @@
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetTariffsList(std::vector<std::string> * tariffsList) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetTariffsList(std::vector<std::string> * tariffsList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -66,7 +66,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddTariff(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddTariff(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -94,7 +94,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelTariff(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelTariff(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -122,7 +122,7 @@ return 0;
 int FIREBIRD_STORE::SaveTariff(const TARIFF_DATA & td,
                                const std::string & tariffName) const
 {
 int FIREBIRD_STORE::SaveTariff(const TARIFF_DATA & td,
                                const std::string & tariffName) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -249,7 +249,7 @@ return 0;
 int FIREBIRD_STORE::RestoreTariff(TARIFF_DATA * td,
                                   const std::string & tariffName) const
 {
 int FIREBIRD_STORE::RestoreTariff(TARIFF_DATA * td,
                                   const std::string & tariffName) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
index 131622074760c89260885d00a77e77c6b40b74c2..8c214fbf2b6ccc97ee8781b7e3065fbee1d5207c 100644 (file)
@@ -33,7 +33,7 @@
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetUsersList(std::vector<std::string> * usersList) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetUsersList(std::vector<std::string> * usersList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -65,7 +65,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddUser(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::AddUser(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -93,7 +93,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelUser(const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::DelUser(const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -121,7 +121,7 @@ return 0;
 int FIREBIRD_STORE::SaveUserStat(const USER_STAT & stat,
                                  const std::string & login) const
 {
 int FIREBIRD_STORE::SaveUserStat(const USER_STAT & stat,
                                  const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 return SaveStat(stat, login);
 }
 
 return SaveStat(stat, login);
 }
@@ -226,7 +226,7 @@ return 0;
 int FIREBIRD_STORE::SaveUserConf(const USER_CONF & conf,
                                  const std::string & login) const
 {
 int FIREBIRD_STORE::SaveUserConf(const USER_CONF & conf,
                                  const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -354,7 +354,7 @@ return 0;
 int FIREBIRD_STORE::RestoreUserStat(USER_STAT * stat,
                                     const std::string & login) const
 {
 int FIREBIRD_STORE::RestoreUserStat(USER_STAT * stat,
                                     const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -441,7 +441,7 @@ return 0;
 int FIREBIRD_STORE::RestoreUserConf(USER_CONF * conf,
                                     const std::string & login) const
 {
 int FIREBIRD_STORE::RestoreUserConf(USER_CONF * conf,
                                     const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -567,7 +567,7 @@ int FIREBIRD_STORE::WriteUserChgLog(const std::string & login,
                                     const std::string & newValue,
                                     const std::string & message = "") const
 {
                                     const std::string & newValue,
                                     const std::string & message = "") const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -627,7 +627,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::WriteUserConnect(const std::string & login, uint32_t ip) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::WriteUserConnect(const std::string & login, uint32_t ip) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -664,7 +664,7 @@ int FIREBIRD_STORE::WriteUserDisconnect(const std::string & login,
                     double /*freeMb*/,
                     const std::string & /*reason*/) const
 {
                     double /*freeMb*/,
                     const std::string & /*reason*/) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -712,7 +712,7 @@ int FIREBIRD_STORE::WriteDetailedStat(const std::map<IP_DIR_PAIR, STAT_NODE> & s
                                       time_t lastStat,
                                       const std::string & login) const
 {
                                       time_t lastStat,
                                       const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -762,7 +762,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveMonthStat(const USER_STAT & stat, int month, int year, const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveMonthStat(const USER_STAT & stat, int month, int year, const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
index 0bd8f629771d74ebf7d13e125250853367564c63..ef090f17d498c790542f6f89026583796ce0517c 100644 (file)
@@ -17,7 +17,6 @@ SRCS =        ./postgresql_store.cpp \
 
 STGLIBS = common \
          crypto \
 
 STGLIBS = common \
          crypto \
-         locker \
          logger
 
 PG_CFLAGS = $(shell pg_config --includedir)
          logger
 
 PG_CFLAGS = $(shell pg_config --includedir)
index 1e9db12dbd3731f05b5f2acfb71f14a6421f06cc..63cf3d5ce0eba7d2fbcca0ff1b28e2e6c868f1d9 100644 (file)
@@ -42,7 +42,7 @@
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetAdminsList(std::vector<std::string> * adminsList) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetAdminsList(std::vector<std::string> * adminsList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -98,7 +98,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveAdmin(const ADMIN_CONF & ac) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveAdmin(const ADMIN_CONF & ac) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -197,7 +197,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::RestoreAdmin(ADMIN_CONF * ac, const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::RestoreAdmin(ADMIN_CONF * ac, const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -318,7 +318,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddAdmin(const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddAdmin(const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -388,7 +388,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelAdmin(const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelAdmin(const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
index 1d33d5b0f85a3ed6fc72430aa2ca412b31ada313..84fab02b3ff2d0a7a015aa55fd3dada650a70904 100644 (file)
@@ -38,7 +38,7 @@
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetCorpsList(std::vector<std::string> * corpsList) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetCorpsList(std::vector<std::string> * corpsList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -94,7 +94,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveCorp(const CORP_CONF & cc) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveCorp(const CORP_CONF & cc) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -160,7 +160,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::RestoreCorp(CORP_CONF * cc, const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::RestoreCorp(CORP_CONF * cc, const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -243,7 +243,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddCorp(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddCorp(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -310,7 +310,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelCorp(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelCorp(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
index 5a55504d80ceea9192156085e9cfe3a52c23edd0..27401e268ff874bdded9fde809e1e5d025395c07 100644 (file)
@@ -40,7 +40,7 @@
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddMessage(STG_MSG * msg, const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddMessage(STG_MSG * msg, const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -143,7 +143,7 @@ return 0;
 int POSTGRESQL_STORE::EditMessage(const STG_MSG & msg,
                                   const std::string & login) const
 {
 int POSTGRESQL_STORE::EditMessage(const STG_MSG & msg,
                                   const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -229,7 +229,7 @@ int POSTGRESQL_STORE::GetMessage(uint64_t id,
                                STG_MSG * msg,
                                const std::string &) const
 {
                                STG_MSG * msg,
                                const std::string &) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -307,7 +307,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelMessage(uint64_t id, const std::string &) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelMessage(uint64_t id, const std::string &) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -359,7 +359,7 @@ return 0;
 int POSTGRESQL_STORE::GetMessageHdrs(std::vector<STG_MSG_HDR> * hdrsList,
                                    const std::string & login) const
 {
 int POSTGRESQL_STORE::GetMessageHdrs(std::vector<STG_MSG_HDR> * hdrsList,
                                    const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
index 825f798261410fec3da02be913c53cdc630adaf0..70b9c64ca675a43276e44cc4233ba7686c04cc12 100644 (file)
@@ -39,7 +39,7 @@
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetServicesList(std::vector<std::string> * servicesList) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetServicesList(std::vector<std::string> * servicesList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -95,7 +95,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveService(const SERVICE_CONF & sc) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveService(const SERVICE_CONF & sc) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -175,7 +175,7 @@ return 0;
 int POSTGRESQL_STORE::RestoreService(SERVICE_CONF * sc,
                                    const std::string & name) const
 {
 int POSTGRESQL_STORE::RestoreService(SERVICE_CONF * sc,
                                    const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -262,7 +262,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddService(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddService(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -329,7 +329,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelService(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelService(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
index d4fdd3902cf96393ac951a6a6b83c771eeab7db3..dabc06db5586a9c5232eebef51fd66936f123986 100644 (file)
@@ -39,7 +39,7 @@
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetTariffsList(std::vector<std::string> * tariffsList) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetTariffsList(std::vector<std::string> * tariffsList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -95,7 +95,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddTariff(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddTariff(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -158,7 +158,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelTariff(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelTariff(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -222,7 +222,7 @@ return 0;
 int POSTGRESQL_STORE::SaveTariff(const TARIFF_DATA & td,
                                  const std::string & tariffName) const
 {
 int POSTGRESQL_STORE::SaveTariff(const TARIFF_DATA & td,
                                  const std::string & tariffName) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -403,7 +403,7 @@ return 0;
 int POSTGRESQL_STORE::RestoreTariff(TARIFF_DATA * td,
                                   const std::string & tariffName) const
 {
 int POSTGRESQL_STORE::RestoreTariff(TARIFF_DATA * td,
                                   const std::string & tariffName) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
index b990300c27cc960b0c67d9bc534cb0db3b072d0a..db2717acb0496e8da8f7b8b8f2a9bd62e7b01c5b 100644 (file)
@@ -41,7 +41,7 @@
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetUsersList(std::vector<std::string> * usersList) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetUsersList(std::vector<std::string> * usersList) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -97,7 +97,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddUser(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::AddUser(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -161,7 +161,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelUser(const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::DelUser(const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -225,7 +225,7 @@ return 0;
 int POSTGRESQL_STORE::SaveUserStat(const USER_STAT & stat,
                                    const std::string & login) const
 {
 int POSTGRESQL_STORE::SaveUserStat(const USER_STAT & stat,
                                    const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 return SaveStat(stat, login);
 }
 
 return SaveStat(stat, login);
 }
@@ -336,7 +336,7 @@ return 0;
 int POSTGRESQL_STORE::SaveUserConf(const USER_CONF & conf,
                                  const std::string & login) const
 {
 int POSTGRESQL_STORE::SaveUserConf(const USER_CONF & conf,
                                  const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -607,7 +607,7 @@ return 0;
 int POSTGRESQL_STORE::RestoreUserStat(USER_STAT * stat,
                                     const std::string & login) const
 {
 int POSTGRESQL_STORE::RestoreUserStat(USER_STAT * stat,
                                     const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -747,7 +747,7 @@ return 0;
 int POSTGRESQL_STORE::RestoreUserConf(USER_CONF * conf,
                                     const std::string & login) const
 {
 int POSTGRESQL_STORE::RestoreUserConf(USER_CONF * conf,
                                     const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -994,7 +994,7 @@ int POSTGRESQL_STORE::WriteUserChgLog(const std::string & login,
                                     const std::string & newValue,
                                     const std::string & message = "") const
 {
                                     const std::string & newValue,
                                     const std::string & message = "") const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -1111,7 +1111,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::WriteUserConnect(const std::string & login, uint32_t ip) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::WriteUserConnect(const std::string & login, uint32_t ip) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -1197,7 +1197,7 @@ int POSTGRESQL_STORE::WriteUserDisconnect(const std::string & login,
                     double freeMb,
                     const std::string & reason) const
 {
                     double freeMb,
                     const std::string & reason) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -1356,7 +1356,7 @@ int POSTGRESQL_STORE::WriteDetailedStat(const std::map<IP_DIR_PAIR, STAT_NODE> &
                                       time_t lastStat,
                                       const std::string & login) const
 {
                                       time_t lastStat,
                                       const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
 
 if (PQstatus(connection) != CONNECTION_OK)
     {
@@ -1435,7 +1435,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveMonthStat(const USER_STAT & stat, int month, int year, const std::string & login) const
 {
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::SaveMonthStat(const USER_STAT & stat, int month, int year, const std::string & login) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 return SaveStat(stat, login, year, month);
 }
 
 return SaveStat(stat, login, year, month);
 }
index 832bf7e9ed54356313beb197670282481f3e67e6..aebb98fb84cf0653765b27d645cca8d46dccd968 100644 (file)
@@ -43,7 +43,7 @@ Read();
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::Add(const SERVICE_CONF & service, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::Add(const SERVICE_CONF & service, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->serviceChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->serviceChg)
@@ -81,7 +81,7 @@ return -1;
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::Del(const std::string & name, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::Del(const std::string & name, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->serviceChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->serviceChg)
@@ -125,7 +125,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::Change(const SERVICE_CONF & service, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::Change(const SERVICE_CONF & service, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->serviceChg)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->serviceChg)
@@ -161,7 +161,7 @@ return 0;
 //-----------------------------------------------------------------------------
 bool SERVICES_IMPL::Read()
 {
 //-----------------------------------------------------------------------------
 bool SERVICES_IMPL::Read()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::vector<std::string> servicesList;
 if (store->GetServicesList(&servicesList) < 0)
     {
 std::vector<std::string> servicesList;
 if (store->GetServicesList(&servicesList) < 0)
     {
@@ -188,7 +188,7 @@ bool SERVICES_IMPL::Find(const std::string & name, SERVICE_CONF * service)
 {
 assert(service != NULL && "Pointer to service is not null");
 
 {
 assert(service != NULL && "Pointer to service is not null");
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (data.empty())
     return false;
 
 if (data.empty())
     return false;
 
@@ -205,7 +205,7 @@ return true;
 //-----------------------------------------------------------------------------
 bool SERVICES_IMPL::Exists(const std::string & name) const
 {
 //-----------------------------------------------------------------------------
 bool SERVICES_IMPL::Exists(const std::string & name) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
 if (data.empty())
     {
     printfd(__FILE__, "no admin in system!\n");
@@ -222,7 +222,7 @@ return false;
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::OpenSearch() const
 {
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::OpenSearch() const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 handle++;
 searchDescriptors[handle] = data.begin();
 return handle;
 handle++;
 searchDescriptors[handle] = data.begin();
 return handle;
@@ -230,7 +230,7 @@ return handle;
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::SearchNext(int h, SERVICE_CONF * service) const
 {
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::SearchNext(int h, SERVICE_CONF * service) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
     WriteServLog("SERVICES. Incorrect search handle.");
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
     WriteServLog("SERVICES. Incorrect search handle.");
@@ -247,7 +247,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::CloseSearch(int h) const
 {
 //-----------------------------------------------------------------------------
 int SERVICES_IMPL::CloseSearch(int h) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
index dbd3d2e397934e442e8dd980716c588b8159ef76..aee486d76fdb03b5e20a2147926d51f5f0cb923a 100644 (file)
@@ -63,7 +63,7 @@ pthread_mutex_destroy(&mutex);
 //-----------------------------------------------------------------------------
 int TARIFFS_IMPL::ReadTariffs()
 {
 //-----------------------------------------------------------------------------
 int TARIFFS_IMPL::ReadTariffs()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 vector<string> tariffsList;
 if (store->GetTariffsList(&tariffsList))
 
 vector<string> tariffsList;
 if (store->GetTariffsList(&tariffsList))
@@ -91,7 +91,7 @@ return 0;
 //-----------------------------------------------------------------------------
 size_t TARIFFS_IMPL::Count() const
 {
 //-----------------------------------------------------------------------------
 size_t TARIFFS_IMPL::Count() const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 return tariffs.size();
 }
 //-----------------------------------------------------------------------------
 return tariffs.size();
 }
 //-----------------------------------------------------------------------------
@@ -100,7 +100,7 @@ const TARIFF * TARIFFS_IMPL::FindByName(const string & name) const
 if (name == NO_TARIFF_NAME)
     return &noTariff;
 
 if (name == NO_TARIFF_NAME)
     return &noTariff;
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 list<TARIFF_IMPL>::const_iterator ti;
 ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name));
 
 list<TARIFF_IMPL>::const_iterator ti;
 ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name));
 
@@ -123,7 +123,7 @@ if (!priv->tariffChg)
     return -1;
     }
 
     return -1;
     }
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 list<TARIFF_IMPL>::iterator ti;
 ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(td.tariffConf.name));
 
 list<TARIFF_IMPL>::iterator ti;
 ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(td.tariffConf.name));
@@ -166,7 +166,7 @@ if (!priv->tariffChg)
 TARIFF_DATA td;
 
     {
 TARIFF_DATA td;
 
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
 
     list<TARIFF_IMPL>::iterator ti;
     ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name));
 
     list<TARIFF_IMPL>::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<TARIFF_IMPL>::iterator ti;
     ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name));
 
     list<TARIFF_IMPL>::iterator ti;
     ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name));
@@ -256,7 +256,7 @@ return 0;
 void TARIFFS_IMPL::GetTariffsData(std::list<TARIFF_DATA> * tdl)
 {
 assert(tdl != NULL && "Tariffs data list is not null");
 void TARIFFS_IMPL::GetTariffsData(std::list<TARIFF_DATA> * 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)
 
 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<TARIFF_DATA> * n)
 {
 //-----------------------------------------------------------------------------
 void TARIFFS_IMPL::AddNotifierAdd(NOTIFIER_BASE<TARIFF_DATA> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onAddNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void TARIFFS_IMPL::DelNotifierAdd(NOTIFIER_BASE<TARIFF_DATA> * n)
 {
 onAddNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void TARIFFS_IMPL::DelNotifierAdd(NOTIFIER_BASE<TARIFF_DATA> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onAddNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
 void TARIFFS_IMPL::AddNotifierDel(NOTIFIER_BASE<TARIFF_DATA> * n)
 {
 onAddNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
 void TARIFFS_IMPL::AddNotifierDel(NOTIFIER_BASE<TARIFF_DATA> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onDelNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void TARIFFS_IMPL::DelNotifierDel(NOTIFIER_BASE<TARIFF_DATA> * n)
 {
 onDelNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void TARIFFS_IMPL::DelNotifierDel(NOTIFIER_BASE<TARIFF_DATA> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onDelNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
 onDelNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
index 985de59336bdf1239b4b4c1cf265dc8b12854964..5223c5c4c8bfa7e8739c844ad23620b5ac91285c 100644 (file)
@@ -97,7 +97,7 @@ pthread_mutex_destroy(&mutex);
 //-----------------------------------------------------------------------------
 int TRAFFCOUNTER_IMPL::Start()
 {
 //-----------------------------------------------------------------------------
 int TRAFFCOUNTER_IMPL::Start()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (!stopped)
     return 0;
 
 if (!stopped)
     return 0;
@@ -212,7 +212,7 @@ if (monitoring && (touchTimeP + MONITOR_TIME_DELAY_SEC <= stgTime))
     TouchFile(monFile.c_str());
     }
 
     TouchFile(monFile.c_str());
     }
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 //printfd(__FILE__, "TRAFFCOUNTER::Process()\n");
 //TODO replace find with lower_bound.
 
 //printfd(__FILE__, "TRAFFCOUNTER::Process()\n");
 //TODO replace find with lower_bound.
@@ -290,7 +290,7 @@ if (ed.userUPresent ||
 //-----------------------------------------------------------------------------
 void TRAFFCOUNTER_IMPL::FlushAndRemove()
 {
 //-----------------------------------------------------------------------------
 void TRAFFCOUNTER_IMPL::FlushAndRemove()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 Packets::size_type oldPacketsSize = packets.size();
 Index::size_type oldIp2packetsSize = ip2packets.size();
 
 Packets::size_type oldPacketsSize = packets.size();
 Index::size_type oldIp2packetsSize = ip2packets.size();
@@ -377,7 +377,7 @@ printfd(__FILE__, "AddUser: %s\n", user->GetLogin().c_str());
 uint32_t uip = user->GetCurrIP();
 std::pair<ip2p_iter, ip2p_iter> pi;
 
 uint32_t uip = user->GetCurrIP();
 std::pair<ip2p_iter, ip2p_iter> pi;
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 // Find all packets with IP belongs to this user
 pi = ip2packets.equal_range(uip);
 
 // Find all packets with IP belongs to this user
 pi = ip2packets.equal_range(uip);
 
@@ -414,7 +414,7 @@ void TRAFFCOUNTER_IMPL::DelUser(uint32_t uip)
 printfd(__FILE__, "DelUser: %s \n", inet_ntostring(uip).c_str());
 std::pair<ip2p_iter, ip2p_iter> pi;
 
 printfd(__FILE__, "DelUser: %s \n", inet_ntostring(uip).c_str());
 std::pair<ip2p_iter, ip2p_iter> pi;
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 pi = ip2packets.equal_range(uip);
 
 while (pi.first != pi.second)
 pi = ip2packets.equal_range(uip);
 
 while (pi.first != pi.second)
@@ -717,7 +717,7 @@ return false;
 //-----------------------------------------------------------------------------
 int TRAFFCOUNTER_IMPL::Reload()
 {
 //-----------------------------------------------------------------------------
 int TRAFFCOUNTER_IMPL::Reload()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (ReadRules(true))
     {
 
 if (ReadRules(true))
     {
index 47f352284a1a96ed2bb2b4cbe0d240909dede687..22afa7f87460c24432f0384c77d122e24f0a9078 100644 (file)
@@ -319,7 +319,7 @@ pthread_mutex_destroy(&mutex);
 //-----------------------------------------------------------------------------
 void USER_IMPL::SetLogin(const std::string & l)
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::SetLogin(const std::string & l)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 assert(login.empty() && "Login is already set");
 login = l;
 id = userIDGenerator.GetNextID();
 assert(login.empty() && "Login is already set");
 login = l;
 id = userIDGenerator.GetNextID();
@@ -327,7 +327,7 @@ id = userIDGenerator.GetNextID();
 //-----------------------------------------------------------------------------
 int USER_IMPL::ReadConf()
 {
 //-----------------------------------------------------------------------------
 int USER_IMPL::ReadConf()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 USER_CONF conf;
 
 if (store->RestoreUserConf(&conf, login))
 USER_CONF conf;
 
 if (store->RestoreUserConf(&conf, login))
@@ -375,7 +375,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USER_IMPL::ReadStat()
 {
 //-----------------------------------------------------------------------------
 int USER_IMPL::ReadStat()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 USER_STAT stat;
 
 if (store->RestoreUserStat(&stat, login))
 USER_STAT stat;
 
 if (store->RestoreUserStat(&stat, login))
@@ -394,7 +394,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USER_IMPL::WriteConf()
 {
 //-----------------------------------------------------------------------------
 int USER_IMPL::WriteConf()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 USER_CONF conf(property.GetConf());
 
 printfd(__FILE__, "USER::WriteConf()\n");
 USER_CONF conf(property.GetConf());
 
 printfd(__FILE__, "USER::WriteConf()\n");
@@ -413,7 +413,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USER_IMPL::WriteStat()
 {
 //-----------------------------------------------------------------------------
 int USER_IMPL::WriteStat()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 USER_STAT stat(property.GetStat());
 
 if (store->SaveUserStat(stat, login))
 USER_STAT stat(property.GetStat());
 
 if (store->SaveUserStat(stat, login))
@@ -432,7 +432,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USER_IMPL::WriteMonthStat()
 {
 //-----------------------------------------------------------------------------
 int USER_IMPL::WriteMonthStat()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 time_t tt = stgTime - 3600;
 struct tm t1;
 localtime_r(&tt, &t1);
 time_t tt = stgTime - 3600;
 struct tm t1;
 localtime_r(&tt, &t1);
@@ -452,7 +452,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USER_IMPL::Authorize(uint32_t ip, uint32_t dirs, const AUTH * auth)
 {
 //-----------------------------------------------------------------------------
 int USER_IMPL::Authorize(uint32_t ip, uint32_t dirs, const AUTH * auth)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 /*
  *  Authorize user. It only means that user will be authorized. Nothing more.
  *  User can be connected or disconnected while authorized.
 /*
  *  Authorize user. It only means that user will be authorized. Nothing more.
  *  User can be connected or disconnected while authorized.
@@ -527,7 +527,7 @@ return 0;
 //-----------------------------------------------------------------------------
 void USER_IMPL::Unauthorize(const AUTH * auth, const std::string & reason)
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::Unauthorize(const AUTH * auth, const std::string & reason)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 /*
  *  Authorizer tries to unauthorize user, that was not authorized by it
  */
 /*
  *  Authorizer tries to unauthorize user, that was not authorized by it
  */
@@ -546,7 +546,7 @@ if (authorizedBy.empty())
 //-----------------------------------------------------------------------------
 bool USER_IMPL::IsAuthorizedBy(const AUTH * auth) const
 {
 //-----------------------------------------------------------------------------
 bool USER_IMPL::IsAuthorizedBy(const AUTH * auth) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 //  Is this user authorized by specified authorizer?
 return authorizedBy.find(auth) != authorizedBy.end();
 }
 //  Is this user authorized by specified authorizer?
 return authorizedBy.find(auth) != authorizedBy.end();
 }
@@ -564,7 +564,7 @@ void USER_IMPL::Connect(bool fakeConnect)
  *  Connect user to Internet. This function is differ from Authorize() !!!
  */
 
  *  Connect user to Internet. This function is differ from Authorize() !!!
  */
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (!fakeConnect)
     {
 
 if (!fakeConnect)
     {
@@ -623,7 +623,7 @@ void USER_IMPL::Disconnect(bool fakeDisconnect, const std::string & reason)
  *  Disconnect user from Internet. This function is differ from UnAuthorize() !!!
  */
 
  *  Disconnect user from Internet. This function is differ from UnAuthorize() !!!
  */
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (!lastIPForDisconnect)
     {
 
 if (!lastIPForDisconnect)
     {
@@ -695,7 +695,7 @@ sessionDownload = zeroSesssion;
 void USER_IMPL::PrintUser() const
 {
 //return;
 void USER_IMPL::PrintUser() const
 {
 //return;
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::cout << "============================================================" << std::endl;
 std::cout << "id=" << id << std::endl;
 std::cout << "login=" << login << std::endl;
 std::cout << "============================================================" << std::endl;
 std::cout << "id=" << id << std::endl;
 std::cout << "login=" << login << std::endl;
@@ -731,7 +731,7 @@ std::cout << "============================================================" << s
 //-----------------------------------------------------------------------------
 void USER_IMPL::Run()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::Run()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (stgTime > static_cast<time_t>(lastWriteStat + settings->GetStatWritePeriod()))
     {
 
 if (stgTime > static_cast<time_t>(lastWriteStat + settings->GetStatWritePeriod()))
     {
@@ -792,7 +792,7 @@ else
 //-----------------------------------------------------------------------------
 void USER_IMPL::UpdatePingTime(time_t t)
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::UpdatePingTime(time_t t)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 //printfd(__FILE__, "UpdatePingTime(%d) %s\n", t, login.c_str());
 if (t)
     pingTime = t;
 //printfd(__FILE__, "UpdatePingTime(%d) %s\n", t, login.c_str());
 if (t)
     pingTime = t;
@@ -802,7 +802,7 @@ else
 //-----------------------------------------------------------------------------
 bool USER_IMPL::IsInetable()
 {
 //-----------------------------------------------------------------------------
 bool USER_IMPL::IsInetable()
 {
-//STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+//STG_LOCKER lock(&mutex);
 
 if (disabled || passive)
     return false;
 
 if (disabled || passive)
     return false;
@@ -823,7 +823,7 @@ return (cash - tariff->GetFee() >= -credit);
 //-----------------------------------------------------------------------------
 std::string USER_IMPL::GetEnabledDirs() const
 {
 //-----------------------------------------------------------------------------
 std::string USER_IMPL::GetEnabledDirs() const
 {
-//STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+//STG_LOCKER lock(&mutex);
 
 std::string dirs = "";
 for(int i = 0; i < DIR_NUM; i++)
 
 std::string dirs = "";
 for(int i = 0; i < DIR_NUM; i++)
@@ -837,7 +837,7 @@ void USER_IMPL::AddTraffStatU(int dir, uint32_t ip, uint16_t port, uint32_t len)
 void USER_IMPL::AddTraffStatU(int dir, uint32_t ip, uint32_t len)
 #endif
 {
 void USER_IMPL::AddTraffStatU(int dir, uint32_t ip, uint32_t len)
 #endif
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (!connected || tariff == NULL)
     return;
 
 if (!connected || tariff == NULL)
     return;
@@ -929,7 +929,7 @@ void USER_IMPL::AddTraffStatD(int dir, uint32_t ip, uint16_t port, uint32_t len)
 void USER_IMPL::AddTraffStatD(int dir, uint32_t ip, uint32_t len)
 #endif
 {
 void USER_IMPL::AddTraffStatD(int dir, uint32_t ip, uint32_t len)
 #endif
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (!connected || tariff == NULL)
     return;
 
 if (!connected || tariff == NULL)
     return;
@@ -1016,55 +1016,55 @@ else
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddCurrIPBeforeNotifier(CURR_IP_NOTIFIER * notifier)
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddCurrIPBeforeNotifier(CURR_IP_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 currIP.AddBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelCurrIPBeforeNotifier(const CURR_IP_NOTIFIER * notifier)
 {
 currIP.AddBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelCurrIPBeforeNotifier(const CURR_IP_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 currIP.DelBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddCurrIPAfterNotifier(CURR_IP_NOTIFIER * notifier)
 {
 currIP.DelBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddCurrIPAfterNotifier(CURR_IP_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 currIP.AddAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelCurrIPAfterNotifier(const CURR_IP_NOTIFIER * notifier)
 {
 currIP.AddAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelCurrIPAfterNotifier(const CURR_IP_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 currIP.DelAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddConnectedBeforeNotifier(CONNECTED_NOTIFIER * notifier)
 {
 currIP.DelAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddConnectedBeforeNotifier(CONNECTED_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 connected.AddBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelConnectedBeforeNotifier(const CONNECTED_NOTIFIER * notifier)
 {
 connected.AddBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelConnectedBeforeNotifier(const CONNECTED_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 connected.DelBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddConnectedAfterNotifier(CONNECTED_NOTIFIER * notifier)
 {
 connected.DelBeforeNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::AddConnectedAfterNotifier(CONNECTED_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 connected.AddAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelConnectedAfterNotifier(const CONNECTED_NOTIFIER * notifier)
 {
 connected.AddAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::DelConnectedAfterNotifier(const CONNECTED_NOTIFIER * notifier)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 connected.DelAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::OnAdd()
 {
 connected.DelAfterNotifier(notifier);
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::OnAdd()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 std::string scriptOnAdd = settings->GetScriptsDir() + "/OnUserAdd";
 
 
 std::string scriptOnAdd = settings->GetScriptsDir() + "/OnUserAdd";
 
@@ -1086,7 +1086,7 @@ else
 //-----------------------------------------------------------------------------
 void USER_IMPL::OnDelete()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::OnDelete()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 std::string scriptOnDel = settings->GetScriptsDir() + "/OnUserDel";
 
 
 std::string scriptOnDel = settings->GetScriptsDir() + "/OnUserDel";
 
@@ -1127,7 +1127,7 @@ if (!traffStatSaved.second.empty())
 TRAFF_STAT ts;
 
     {
 TRAFF_STAT ts;
 
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
     ts.swap(traffStat);
     }
 
     ts.swap(traffStat);
     }
 
@@ -1143,7 +1143,7 @@ if (ts.size() && !disabledDetailStat)
         if (!hard)
             {
             printfd(__FILE__, "USER::WriteDetailStat() - pushing detail stat to queue\n");
         if (!hard)
             {
             printfd(__FILE__, "USER::WriteDetailStat() - pushing detail stat to queue\n");
-            STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+            STG_LOCKER lock(&mutex);
             traffStatSaved.second.swap(ts);
             traffStatSaved.first = lastWriteDetailedStat;
             }
             traffStatSaved.second.swap(ts);
             traffStatSaved.first = lastWriteDetailedStat;
             }
@@ -1156,7 +1156,7 @@ return 0;
 //-----------------------------------------------------------------------------
 double USER_IMPL::GetPassiveTimePart() const
 {
 //-----------------------------------------------------------------------------
 double USER_IMPL::GetPassiveTimePart() const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 static int daysInMonth[12] =
 {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 
 static int daysInMonth[12] =
 {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
@@ -1183,7 +1183,7 @@ return static_cast<double>(dt) / secMonth;
 //-----------------------------------------------------------------------------
 void USER_IMPL::SetPassiveTimeAsNewUser()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::SetPassiveTimeAsNewUser()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 time_t t = stgTime;
 struct tm tm;
 
 time_t t = stgTime;
 struct tm tm;
@@ -1197,7 +1197,7 @@ passiveTime = static_cast<time_t>(pt * 24 * 3600 * daysCurrMon);
 //-----------------------------------------------------------------------------
 void USER_IMPL::MidnightResetSessionStat()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::MidnightResetSessionStat()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (connected)
     {
 
 if (connected)
     {
@@ -1208,7 +1208,7 @@ if (connected)
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessNewMonth()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessNewMonth()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 //  Reset traff
 if (connected)
     {
 //  Reset traff
 if (connected)
     {
@@ -1248,7 +1248,7 @@ if (nextTariff.ConstData() != "")
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessDayFeeSpread()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessDayFeeSpread()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (passive.ConstData() || tariff == NULL)
     return;
 
 if (passive.ConstData() || tariff == NULL)
     return;
@@ -1285,7 +1285,7 @@ ResetPassiveTime();
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessDayFee()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessDayFee()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (tariff == NULL)
     return;
 
 if (tariff == NULL)
     return;
@@ -1356,7 +1356,7 @@ switch (settings->GetFeeChargeType())
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessDailyFee()
 {
 //-----------------------------------------------------------------------------
 void USER_IMPL::ProcessDailyFee()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (passive.ConstData() || tariff == NULL)
     return;
 
 if (passive.ConstData() || tariff == NULL)
     return;
@@ -1395,7 +1395,7 @@ if (tariff != NULL)
 //-----------------------------------------------------------------------------
 int USER_IMPL::AddMessage(STG_MSG * msg)
 {
 //-----------------------------------------------------------------------------
 int USER_IMPL::AddMessage(STG_MSG * msg)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (SendMessage(*msg))
     {
 
 if (SendMessage(*msg))
     {
index f4b4dea0b800420259afb1caef46753936398332..d66456af5aabf74bb0f5fa49d578d5d0e88f02e1 100644 (file)
@@ -108,7 +108,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByName(const std::string & login, USER_PTR * user)
 {
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByName(const std::string & login, USER_PTR * user)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 user_iter u;
 if (FindByNameNonLock(login, &u))
     return -1;
 user_iter u;
 if (FindByNameNonLock(login, &u))
     return -1;
@@ -118,7 +118,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByName(const std::string & login, CONST_USER_PTR * user) const
 {
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByName(const std::string & login, CONST_USER_PTR * user) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const_user_iter u;
 if (FindByNameNonLock(login, &u))
     return -1;
 const_user_iter u;
 if (FindByNameNonLock(login, &u))
     return -1;
@@ -128,7 +128,7 @@ return 0;
 //-----------------------------------------------------------------------------
 bool USERS_IMPL::TariffInUse(const std::string & tariffName) const
 {
 //-----------------------------------------------------------------------------
 bool USERS_IMPL::TariffInUse(const std::string & tariffName) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::list<USER_IMPL>::const_iterator iter;
 iter = users.begin();
 while (iter != users.end())
 std::list<USER_IMPL>::const_iterator iter;
 iter = users.begin();
 while (iter != users.end())
@@ -142,7 +142,7 @@ return false;
 //-----------------------------------------------------------------------------
 int USERS_IMPL::Add(const std::string & login, const ADMIN * admin)
 {
 //-----------------------------------------------------------------------------
 int USERS_IMPL::Add(const std::string & login, const ADMIN * admin)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->userAddDel)
 const PRIV * priv = admin->GetPriv();
 
 if (!priv->userAddDel)
@@ -233,7 +233,7 @@ if (!priv->userAddDel)
 
 
     {
 
 
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
 
     if (FindByNameNonLock(login, &u))
         {
 
     if (FindByNameNonLock(login, &u))
         {
@@ -265,7 +265,7 @@ if (!priv->userAddDel)
     }
 
     {
     }
 
     {
-    STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+    STG_LOCKER lock(&mutex);
 
     u->OnDelete();
 
 
     u->OnDelete();
 
@@ -286,7 +286,7 @@ bool USERS_IMPL::Authorize(const std::string & login, uint32_t ip,
                            uint32_t enabledDirs, const AUTH * auth)
 {
 user_iter iter;
                            uint32_t enabledDirs, const AUTH * auth)
 {
 user_iter iter;
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (FindByNameNonLock(login, &iter))
     {
     WriteServLog("Attempt to authorize non-existant user '%s'", login.c_str());
 if (FindByNameNonLock(login, &iter))
     {
     WriteServLog("Attempt to authorize non-existant user '%s'", login.c_str());
@@ -319,7 +319,7 @@ bool USERS_IMPL::Unauthorize(const std::string & login,
                              const std::string & reason)
 {
 user_iter iter;
                              const std::string & reason)
 {
 user_iter iter;
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (FindByNameNonLock(login, &iter))
     {
     WriteServLog("Attempt to unauthorize non-existant user '%s'", login.c_str());
 if (FindByNameNonLock(login, &iter))
     {
     WriteServLog("Attempt to unauthorize non-existant user '%s'", login.c_str());
@@ -606,7 +606,7 @@ return 0;
 //-----------------------------------------------------------------------------
 void USERS_IMPL::RealDelUser()
 {
 //-----------------------------------------------------------------------------
 void USERS_IMPL::RealDelUser()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 printfd(__FILE__, "RealDelUser() users to del: %d\n", usersToDelete.size());
 
 
 printfd(__FILE__, "RealDelUser() users to del: %d\n", usersToDelete.size());
 
@@ -641,7 +641,7 @@ uint32_t ip = user->GetCurrIP();
 if (!ip)
     return; // User has disconnected
 
 if (!ip)
     return; // User has disconnected
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 const std::map<uint32_t, user_iter>::iterator it(
         ipIndex.lower_bound(ip)
 
 const std::map<uint32_t, user_iter>::iterator it(
         ipIndex.lower_bound(ip)
@@ -657,7 +657,7 @@ void USERS_IMPL::DelFromIPIdx(uint32_t ip)
 printfd(__FILE__, "USERS: Del IP Idx\n");
 assert(ip && "User has non-null ip");
 
 printfd(__FILE__, "USERS: Del IP Idx\n");
 assert(ip && "User has non-null ip");
 
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 const std::map<uint32_t, user_iter>::iterator it(
         ipIndex.find(ip)
 
 const std::map<uint32_t, user_iter>::iterator it(
         ipIndex.find(ip)
@@ -680,7 +680,7 @@ return true;
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByIPIdx(uint32_t ip, USER_PTR * usr) const
 {
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByIPIdx(uint32_t ip, USER_PTR * usr) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 user_iter iter;
 if (FindByIPIdx(ip, iter))
 
 user_iter iter;
 if (FindByIPIdx(ip, iter))
@@ -694,7 +694,7 @@ return -1;
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByIPIdx(uint32_t ip, USER_IMPL ** usr) const
 {
 //-----------------------------------------------------------------------------
 int USERS_IMPL::FindByIPIdx(uint32_t ip, USER_IMPL ** usr) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 user_iter iter;
 if (FindByIPIdx(ip, iter))
 
 user_iter iter;
 if (FindByIPIdx(ip, iter))
@@ -708,7 +708,7 @@ return -1;
 //-----------------------------------------------------------------------------
 bool USERS_IMPL::IsIPInIndex(uint32_t ip) const
 {
 //-----------------------------------------------------------------------------
 bool USERS_IMPL::IsIPInIndex(uint32_t ip) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 std::map<uint32_t, user_iter>::const_iterator it(ipIndex.find(ip));
 
 
 std::map<uint32_t, user_iter>::const_iterator it(ipIndex.find(ip));
 
@@ -717,7 +717,7 @@ return it != ipIndex.end();
 //-----------------------------------------------------------------------------
 bool USERS_IMPL::IsIPInUse(uint32_t ip, const std::string & login, CONST_USER_PTR * user) const
 {
 //-----------------------------------------------------------------------------
 bool USERS_IMPL::IsIPInUse(uint32_t ip, const std::string & login, CONST_USER_PTR * user) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::list<USER_IMPL>::const_iterator iter;
 iter = users.begin();
 while (iter != users.end())
 std::list<USER_IMPL>::const_iterator iter;
 iter = users.begin();
 while (iter != users.end())
@@ -737,55 +737,55 @@ return false;
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * n)
 {
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onAddNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * n)
 {
 onAddNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onAddNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserDel(NOTIFIER_BASE<USER_PTR> * n)
 {
 onAddNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserDel(NOTIFIER_BASE<USER_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onDelNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserDel(NOTIFIER_BASE<USER_PTR> * n)
 {
 onDelNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserDel(NOTIFIER_BASE<USER_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onDelNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserAdd(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
 onDelNotifiers.erase(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserAdd(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onAddNotifiersImpl.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserAdd(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
 onAddNotifiersImpl.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserAdd(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onAddNotifiersImpl.erase(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserDel(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
 onAddNotifiersImpl.erase(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddNotifierUserDel(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onDelNotifiersImpl.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserDel(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
 onDelNotifiersImpl.insert(n);
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelNotifierUserDel(NOTIFIER_BASE<USER_IMPL_PTR> * n)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 onDelNotifiersImpl.erase(n);
 }
 //-----------------------------------------------------------------------------
 int USERS_IMPL::OpenSearch()
 {
 onDelNotifiersImpl.erase(n);
 }
 //-----------------------------------------------------------------------------
 int USERS_IMPL::OpenSearch()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 handle++;
 searchDescriptors[handle] = users.begin();
 return handle;
 handle++;
 searchDescriptors[handle] = users.begin();
 return handle;
@@ -802,7 +802,7 @@ int USERS_IMPL::SearchNext(int h, USER_PTR * user)
 //-----------------------------------------------------------------------------
 int USERS_IMPL::SearchNext(int h, USER_IMPL ** user)
 {
 //-----------------------------------------------------------------------------
 int USERS_IMPL::SearchNext(int h, USER_IMPL ** user)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
 
 if (searchDescriptors.find(h) == searchDescriptors.end())
     {
@@ -831,7 +831,7 @@ return 0;
 //-----------------------------------------------------------------------------
 int USERS_IMPL::CloseSearch(int h)
 {
 //-----------------------------------------------------------------------------
 int USERS_IMPL::CloseSearch(int h)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
 if (searchDescriptors.find(h) != searchDescriptors.end())
     {
     searchDescriptors.erase(searchDescriptors.find(h));
@@ -844,13 +844,13 @@ return -1;
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddUserIntoIndexes(user_iter user)
 {
 //-----------------------------------------------------------------------------
 void USERS_IMPL::AddUserIntoIndexes(user_iter user)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 loginIndex.insert(make_pair(user->GetLogin(), user));
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelUserFromIndexes(user_iter user)
 {
 loginIndex.insert(make_pair(user->GetLogin(), user));
 }
 //-----------------------------------------------------------------------------
 void USERS_IMPL::DelUserFromIndexes(user_iter user)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 loginIndex.erase(user->GetLogin());
 }
 //-----------------------------------------------------------------------------
 loginIndex.erase(user->GetLogin());
 }
 //-----------------------------------------------------------------------------
diff --git a/stglibs/locker.lib/Makefile b/stglibs/locker.lib/Makefile
deleted file mode 100644 (file)
index 7345263..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# $Id: Makefile,v 1.2 2008/12/04 17:11:55 faust Exp $
-###############################################################################
-
-LIB_NAME = stglocker
-
-SRCS = locker.cpp
-
-INCS = locker.h
-
-LIBS = $(LIB_THREAD)
-
-include ../Makefile.in
diff --git a/stglibs/locker.lib/include/stg/locker.h b/stglibs/locker.lib/include/stg/locker.h
deleted file mode 100644 (file)
index 51ceb73..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- *    This program is free software; you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation; either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    This program is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with this program; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*
- *    Author : Boris Mikhailenko <stg34@stargazer.dp.ua>
- */
-
-/*
- $Revision: 1.5 $
- $Date: 2010/03/04 11:57:11 $
- $Author: faust $
-*/
-
-
-#ifndef STG_LOCKER_H
-#define STG_LOCKER_H
-
-#include <pthread.h>
-
-#ifdef DEBUG_LOCKER
-
-#include <iostream>
-#include <string>
-#include <pthread.h>
-
-#endif
-
-//-----------------------------------------------------------------------------
-class STG_LOCKER
-{
-public:
-    #ifdef DEBUG_LOCKER
-    STG_LOCKER(pthread_mutex_t * m, const char * __file__, int __line__)
-        : mutex(m),
-          file(__file__),
-          line(__line__),
-          lockerMutex(),
-          lockID(0)
-    #else
-    STG_LOCKER(pthread_mutex_t * m, const char *, int)
-        : mutex(m)
-    #endif
-        {
-        mutex = m;
-        #ifdef DEBUG_LOCKER
-        pthread_mutex_lock(&lockerMutex);
-        file = __file__;
-        line = __line__;
-        if (id == 0)
-            pthread_mutex_init(&lockerMutex, NULL);
-
-        lockID = ++id;
-        std::cout << "Lock: " << lockID << " " << file << ":" << line << " " << mutex << " " << pthread_self() << std::endl;
-        pthread_mutex_unlock(&lockerMutex);
-        #endif
-        pthread_mutex_lock(mutex);
-        }
-
-    ~STG_LOCKER()
-        {
-        pthread_mutex_unlock(mutex);
-        #ifdef DEBUG_LOCKER
-        pthread_mutex_lock(&lockerMutex);
-        std::cout << "Unlock: " << lockID << " " << file << ":" << line << " " << mutex << " " << pthread_self() << std::endl;
-        pthread_mutex_unlock(&lockerMutex);
-        #endif
-        }
-private:
-    STG_LOCKER(const STG_LOCKER & rvalue);
-    STG_LOCKER & operator=(const STG_LOCKER & rvalue);
-
-    pthread_mutex_t * mutex;
-    #ifdef DEBUG_LOCKER
-    std::string file;
-    int line;
-    static pthread_mutex_t lockerMutex;
-    static long long id;
-    long long lockID;
-    #endif
-};
-//-----------------------------------------------------------------------------
-
-#endif //STG_LOCKER_H
diff --git a/stglibs/locker.lib/locker.cpp b/stglibs/locker.lib/locker.cpp
deleted file mode 100644 (file)
index 94ef026..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *    This program is free software; you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation; either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    This program is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with this program; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*
- *    Author : Boris Mikhailenko <stg34@stargazer.dp.ua>
- */
-
-/*
- $Revision: 1.2 $
- $Date: 2007/11/30 08:57:49 $
- $Author: nobunaga $
-*/
-
-#ifdef DEBUG_LOCKER
-
-#include <pthread.h>
-
-#include "stg/locker.h"
-
-long long STG_LOCKER::id = 0;
-pthread_mutex_t STG_LOCKER::lockerMutex = PTHREAD_MUTEX_INITIALIZER;
-
-#endif
-
index edc8c174c7fb06a831707aba2d9e5876e7b23955..1689e29403b89c6dd22a0d88fb5dd491d0ec055e 100644 (file)
@@ -123,19 +123,19 @@ return 0;
 //-----------------------------------------------------------------------------
 void STG_PINGER::AddIP(uint32_t ip)
 {
 //-----------------------------------------------------------------------------
 void STG_PINGER::AddIP(uint32_t ip)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 ipToAdd.push_back(ip);
 }
 //-----------------------------------------------------------------------------
 void STG_PINGER::DelIP(uint32_t ip)
 {
 ipToAdd.push_back(ip);
 }
 //-----------------------------------------------------------------------------
 void STG_PINGER::DelIP(uint32_t ip)
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 ipToDel.push_back(ip);
 }
 //-----------------------------------------------------------------------------
 void STG_PINGER::RealAddIP()
 {
 ipToDel.push_back(ip);
 }
 //-----------------------------------------------------------------------------
 void STG_PINGER::RealAddIP()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 std::list<uint32_t>::iterator iter;
 iter = ipToAdd.begin();
 
 std::list<uint32_t>::iterator iter;
 iter = ipToAdd.begin();
@@ -149,7 +149,7 @@ ipToAdd.erase(ipToAdd.begin(), ipToAdd.end());
 //-----------------------------------------------------------------------------
 void STG_PINGER::RealDelIP()
 {
 //-----------------------------------------------------------------------------
 void STG_PINGER::RealDelIP()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 
 std::list<uint32_t>::iterator iter;
 std::multimap<uint32_t, time_t>::iterator treeIter;
 
 std::list<uint32_t>::iterator iter;
 std::multimap<uint32_t, time_t>::iterator treeIter;
@@ -167,7 +167,7 @@ ipToDel.erase(ipToDel.begin(), ipToDel.end());
 //-----------------------------------------------------------------------------
 void STG_PINGER::PrintAllIP()
 {
 //-----------------------------------------------------------------------------
 void STG_PINGER::PrintAllIP()
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::multimap<uint32_t, time_t>::iterator iter;
 iter = pingIP.begin();
 while (iter != pingIP.end())
 std::multimap<uint32_t, time_t>::iterator iter;
 iter = pingIP.begin();
 while (iter != pingIP.end())
@@ -184,7 +184,7 @@ while (iter != pingIP.end())
 //-----------------------------------------------------------------------------
 int STG_PINGER::GetIPTime(uint32_t ip, time_t * t) const
 {
 //-----------------------------------------------------------------------------
 int STG_PINGER::GetIPTime(uint32_t ip, time_t * t) const
 {
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 std::multimap<uint32_t, time_t>::const_iterator treeIter;
 
 treeIter = pingIP.find(ip);
 std::multimap<uint32_t, time_t>::const_iterator treeIter;
 
 treeIter = pingIP.find(ip);
index 8dbc66b7ee5a7dd93c0b4b0fcf7d9031ffde290e..0b073d2d7d0352ef030c5c19ef6fc7704fe3a260 100644 (file)
@@ -24,7 +24,7 @@ IpAddress_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
        
        size = st->size;
        
        
        size = st->size;
        
-       if((size == 4)) {
+       if(size == 4) {
                /* Constraint check succeeded */
                return 0;
        } else {
                /* Constraint check succeeded */
                return 0;
        } else {