]> git.stg.codes - stg.git/commitdiff
Hide or add proper copy ctor and assignement operator, initialize
authorMaxim Mamontov <faust.madf@gmail.com>
Thu, 15 Sep 2011 08:48:41 +0000 (11:48 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Thu, 15 Sep 2011 08:48:41 +0000 (11:48 +0300)
members via initialization lists

18 files changed:
projects/stargazer/plugins/authorization/ao/ao.cpp
projects/stargazer/plugins/authorization/ao/ao.h
projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
projects/stargazer/plugins/authorization/inetaccess/inetaccess.h
projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp
projects/stargazer/plugins/capture/cap_nf/cap_nf.h
projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp
projects/stargazer/plugins/capture/divert_freebsd/divert_cap.h
projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp
projects/stargazer/plugins/capture/ether_freebsd/ether_cap.h
projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp
projects/stargazer/plugins/capture/ether_linux/ether_cap.h
projects/stargazer/plugins/capture/ipq_linux/ipq_cap.cpp
projects/stargazer/plugins/capture/ipq_linux/ipq_cap.h
stglibs/locker.lib/locker.h
stglibs/logger.lib/logger.cpp
stglibs/logger.lib/logger.h
stglibs/pinger.lib/pinger.cpp

index 7079d7d9b5548c41fb147a96c82acd081e39803a..cef272c0b9bca72ecb75f2601ae6c8cf3fe54995 100644 (file)
@@ -70,8 +70,15 @@ return "Always Online authorizator v.1.0";
 }
 //-----------------------------------------------------------------------------
 AUTH_AO::AUTH_AO()
 }
 //-----------------------------------------------------------------------------
 AUTH_AO::AUTH_AO()
-    : users(NULL),
+    : errorStr(),
+      users(NULL),
+      usersList(),
       isRunning(false),
       isRunning(false),
+      settings(),
+      BeforeChgAONotifierList(),
+      AfterChgAONotifierList(),
+      BeforeChgIPNotifierList(),
+      AfterChgIPNotifierList(),
       onAddUserNotifier(*this),
       onDelUserNotifier(*this)
 {
       onAddUserNotifier(*this),
       onDelUserNotifier(*this)
 {
index df21803b25b754aa5821fe8e2c4d9411e6d06758..5d17cbffff44c650a38f001d14739107bf6b25f7 100644 (file)
@@ -43,26 +43,36 @@ extern "C" PLUGIN * GetPlugin();
 class AUTH_AO;
 class USERS;
 //-----------------------------------------------------------------------------
 class AUTH_AO;
 class USERS;
 //-----------------------------------------------------------------------------
-template <typename varParamType>
-class CHG_BEFORE_NOTIFIER : public PROPERTY_NOTIFIER_BASE<varParamType> {
+template <typename T>
+class CHG_BEFORE_NOTIFIER : public PROPERTY_NOTIFIER_BASE<T> {
 public:
                 CHG_BEFORE_NOTIFIER(AUTH_AO & a, USER_PTR u) : user(u), auth(a) {}
 public:
                 CHG_BEFORE_NOTIFIER(AUTH_AO & a, USER_PTR u) : user(u), auth(a) {}
-    void        Notify(const varParamType & oldValue, const varParamType & newValue);
+                CHG_BEFORE_NOTIFIER(const CHG_BEFORE_NOTIFIER<T> & rvalue)
+                    : user(rvalue.user), auth(rvalue.auth)
+                {}
+    void        Notify(const T & oldValue, const T & newValue);
     USER_PTR    GetUser() const { return user; }
 
 private:
     USER_PTR    GetUser() const { return user; }
 
 private:
+    CHG_BEFORE_NOTIFIER<T> & operator=(const CHG_BEFORE_NOTIFIER<T> & rvalue);
+
     USER_PTR        user;
     const AUTH_AO & auth;
 };
 //-----------------------------------------------------------------------------
     USER_PTR        user;
     const AUTH_AO & auth;
 };
 //-----------------------------------------------------------------------------
-template <typename varParamType>
-class CHG_AFTER_NOTIFIER : public PROPERTY_NOTIFIER_BASE<varParamType> {
+template <typename T>
+class CHG_AFTER_NOTIFIER : public PROPERTY_NOTIFIER_BASE<T> {
 public:
                 CHG_AFTER_NOTIFIER(AUTH_AO & a, USER_PTR u) : user(u), auth(a) {}
 public:
                 CHG_AFTER_NOTIFIER(AUTH_AO & a, USER_PTR u) : user(u), auth(a) {}
-    void        Notify(const varParamType & oldValue, const varParamType & newValue);
+                CHG_AFTER_NOTIFIER(const CHG_AFTER_NOTIFIER<T> & rvalue)
+                    : user(rvalue.user), auth(rvalue.auth)
+                {}
+    void        Notify(const T & oldValue, const T & newValue);
     USER_PTR    GetUser() const { return user; }
 
 private:
     USER_PTR    GetUser() const { return user; }
 
 private:
+    CHG_AFTER_NOTIFIER<T> & operator=(const CHG_AFTER_NOTIFIER<T> & rvalue);
+
     USER_PTR        user;
     const AUTH_AO & auth;
 };
     USER_PTR        user;
     const AUTH_AO & auth;
 };
@@ -91,6 +101,9 @@ public:
     int                 SendMessage(const STG_MSG & msg, uint32_t ip) const;
 
 private:
     int                 SendMessage(const STG_MSG & msg, uint32_t ip) const;
 
 private:
+    AUTH_AO(const AUTH_AO & rvalue);
+    AUTH_AO & operator=(const AUTH_AO & rvalue);
+
     void                GetUsers();
     void                SetUserNotifiers(USER_PTR u);
     void                UnSetUserNotifiers(USER_PTR u);
     void                GetUsers();
     void                SetUserNotifiers(USER_PTR u);
     void                UnSetUserNotifiers(USER_PTR u);
@@ -112,13 +125,12 @@ private:
     public:
         ADD_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
         virtual ~ADD_USER_NONIFIER() {}
     public:
         ADD_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
         virtual ~ADD_USER_NONIFIER() {}
-
-        void Notify(const USER_PTR & user)
-            {
-            auth.AddUser(user);
-            }
+        void Notify(const USER_PTR & user) { auth.AddUser(user); }
 
     private:
 
     private:
+        ADD_USER_NONIFIER(const ADD_USER_NONIFIER & rvalue);
+        ADD_USER_NONIFIER & operator=(const ADD_USER_NONIFIER & rvalue);
+
         AUTH_AO & auth;
     } onAddUserNotifier;
 
         AUTH_AO & auth;
     } onAddUserNotifier;
 
@@ -126,13 +138,12 @@ private:
     public:
         DEL_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
         virtual ~DEL_USER_NONIFIER() {}
     public:
         DEL_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
         virtual ~DEL_USER_NONIFIER() {}
-
-        void Notify(const USER_PTR & user)
-            {
-            auth.DelUser(user);
-            }
+        void Notify(const USER_PTR & user) { auth.DelUser(user); }
 
     private:
 
     private:
+        DEL_USER_NONIFIER(const DEL_USER_NONIFIER & rvalue);
+        DEL_USER_NONIFIER & operator=(const DEL_USER_NONIFIER & rvalue);
+
         AUTH_AO & auth;
     } onDelUserNotifier;
 
         AUTH_AO & auth;
     } onDelUserNotifier;
 
index 9fc12ecce23c54bb30ce4d65d3fb7a0313cf69ca..5e468d0fdeaddf192a616bb9869b07e10ca63d31 100644 (file)
@@ -70,6 +70,7 @@ AUTH_IA_SETTINGS::AUTH_IA_SETTINGS()
     : userDelay(0),
       userTimeout(0),
       port(0),
     : userDelay(0),
       userTimeout(0),
       port(0),
+      errorStr(),
       freeMbShowType(freeMbCash)
 {
 }
       freeMbShowType(freeMbCash)
 {
 }
@@ -173,13 +174,15 @@ return 0;
 #ifdef IA_PHASE_DEBUG
 IA_PHASE::IA_PHASE()
     : phase(1),
 #ifdef IA_PHASE_DEBUG
 IA_PHASE::IA_PHASE()
     : phase(1),
+      phaseTime(),
       flog(NULL)
 {
 gettimeofday(&phaseTime, NULL);
 }
 #else
 IA_PHASE::IA_PHASE()
       flog(NULL)
 {
 gettimeofday(&phaseTime, NULL);
 }
 #else
 IA_PHASE::IA_PHASE()
-    : phase(1)
+    : phase(1),
+      phaseTime()
 {
 gettimeofday(&phaseTime, NULL);
 }
 {
 gettimeofday(&phaseTime, NULL);
 }
@@ -295,12 +298,29 @@ return phaseTime;
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 AUTH_IA::AUTH_IA()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 AUTH_IA::AUTH_IA()
-    : nonstop(false),
+    : ctxS(),
+      errorStr(),
+      iaSettings(),
+      settings(),
+      nonstop(false),
       isRunningRun(false),
       isRunningRunTimeouter(false),
       users(NULL),
       stgSettings(NULL),
       isRunningRun(false),
       isRunningRunTimeouter(false),
       users(NULL),
       stgSettings(NULL),
+      ip2user(),
+      recvThread(),
+      timeouterThread(),
+      mutex(),
       listenSocket(-1),
       listenSocket(-1),
+      connSynAck6(),
+      connSynAck8(),
+      disconnSynAck6(),
+      disconnSynAck8(),
+      aliveSyn6(),
+      aliveSyn8(),
+      fin6(),
+      fin8(),
+      packetTypes(),
       WriteServLog(GetStgLogger()),
       enabledDirs(0xFFffFFff),
       onDelUserNotifier(*this)
       WriteServLog(GetStgLogger()),
       enabledDirs(0xFFffFFff),
       onDelUserNotifier(*this)
index e55733c10814cf407223198bad4360a47ed5a7e6..ad1c7fe7352c163c5139f55dbc7ff83f11a4a6dc 100644 (file)
@@ -120,9 +120,12 @@ struct IA_USER {
     IA_USER()
         : login(),
           user(NULL),
     IA_USER()
         : login(),
           user(NULL),
+          phase(),
           lastSendAlive(0),
           rnd(random()),
           port(0),
           lastSendAlive(0),
           rnd(random()),
           port(0),
+          ctx(),
+          messagesToSend(),
           protoVer(0),
           password("NO PASSWORD")
     {
           protoVer(0),
           password("NO PASSWORD")
     {
@@ -143,6 +146,7 @@ struct IA_USER {
           lastSendAlive(u.lastSendAlive),
           rnd(u.rnd),
           port(u.port),
           lastSendAlive(u.lastSendAlive),
           rnd(u.rnd),
           port(u.port),
+          ctx(),
           messagesToSend(u.messagesToSend),
           protoVer(u.protoVer),
           password(u.password)
           messagesToSend(u.messagesToSend),
           protoVer(u.protoVer),
           password(u.password)
@@ -191,6 +195,9 @@ struct IA_USER {
     #ifdef IA_DEBUG
     bool            aliveSent;
     #endif
     #ifdef IA_DEBUG
     bool            aliveSent;
     #endif
+
+private:
+    IA_USER & operator=(const IA_USER & rvalue);
 };
 //-----------------------------------------------------------------------------
 class AUTH_IA_SETTINGS {
 };
 //-----------------------------------------------------------------------------
 class AUTH_IA_SETTINGS {
@@ -221,6 +228,9 @@ public:
 
     void Notify(const USER_PTR & user);
 private:
 
     void Notify(const USER_PTR & user);
 private:
+    DEL_USER_NOTIFIER(const DEL_USER_NOTIFIER & rvalue);
+    DEL_USER_NOTIFIER & operator=(const DEL_USER_NOTIFIER & rvalue);
+
     AUTH_IA & auth;
 };
 //-----------------------------------------------------------------------------
     AUTH_IA & auth;
 };
 //-----------------------------------------------------------------------------
@@ -248,6 +258,9 @@ public:
     int                 SendMessage(const STG_MSG & msg, uint32_t ip) const;
 
 private:
     int                 SendMessage(const STG_MSG & msg, uint32_t ip) const;
 
 private:
+    AUTH_IA(const AUTH_IA & rvalue);
+    AUTH_IA & operator=(const AUTH_IA & rvalue);
+
     static void *       Run(void *);
     static void *       RunTimeouter(void * d);
     int                 PrepareNet();
     static void *       Run(void *);
     static void *       RunTimeouter(void * d);
     int                 PrepareNet();
@@ -354,11 +367,14 @@ private:
     class UnauthorizeUser : std::unary_function<const std::pair<uint32_t, IA_USER> &, void> {
         public:
             UnauthorizeUser(AUTH_IA * a) : auth(a) {}
     class UnauthorizeUser : std::unary_function<const std::pair<uint32_t, IA_USER> &, void> {
         public:
             UnauthorizeUser(AUTH_IA * a) : auth(a) {}
+            UnauthorizeUser(const UnauthorizeUser & rvalue) : auth(rvalue.auth) {}
             void operator()(const std::pair<uint32_t, IA_USER> & p)
             {
                 auth->users->Unauthorize(p.second.user->GetLogin(), auth);
             }
         private:
             void operator()(const std::pair<uint32_t, IA_USER> & p)
             {
                 auth->users->Unauthorize(p.second.user->GetLogin(), auth);
             }
         private:
+            UnauthorizeUser & operator=(const UnauthorizeUser & rvalue);
+
             AUTH_IA * auth;
     };
 
             AUTH_IA * auth;
     };
 
index a572e8a17af9efc02ab86c8c28e11a79a20302ea..9ed507561ddb75e575d3215e0143cc01c921b514 100644 (file)
@@ -54,8 +54,9 @@ return cnc.GetPlugin();
 
 NF_CAP::NF_CAP()
     : traffCnt(NULL),
 
 NF_CAP::NF_CAP()
     : traffCnt(NULL),
-      tidTCP(0),
-      tidUDP(0),
+      settings(),
+      tidTCP(),
+      tidUDP(),
       runningTCP(false),
       runningUDP(false),
       stoppedTCP(true),
       runningTCP(false),
       runningUDP(false),
       stoppedTCP(true),
@@ -63,7 +64,8 @@ NF_CAP::NF_CAP()
       portT(0),
       portU(0),
       sockTCP(-1),
       portT(0),
       portU(0),
       sockTCP(-1),
-      sockUDP(-1)
+      sockUDP(-1),
+      errorStr()
 {
 }
 
 {
 }
 
@@ -373,14 +375,14 @@ for (int i = 0; i < packets; ++i)
     {
     NF_DATA * data = reinterpret_cast<NF_DATA *>(buf + 24 + i * 48);
 
     {
     NF_DATA * data = reinterpret_cast<NF_DATA *>(buf + 24 + i * 48);
 
-    ip.header.ipHeader.ip_v = 4;
-    ip.header.ipHeader.ip_hl = 5;
-    ip.header.ipHeader.ip_p = data->proto;
+    ip.rawPacket.header.ipHeader.ip_v = 4;
+    ip.rawPacket.header.ipHeader.ip_hl = 5;
+    ip.rawPacket.header.ipHeader.ip_p = data->proto;
     ip.dataLen = ntohl(data->octets);
     ip.dataLen = ntohl(data->octets);
-    ip.header.ipHeader.ip_src.s_addr = data->srcAddr;
-    ip.header.ipHeader.ip_dst.s_addr = data->dstAddr;
-    ip.header.sPort = data->srcPort;
-    ip.header.dPort = data->dstPort;
+    ip.rawPacket.header.ipHeader.ip_src.s_addr = data->srcAddr;
+    ip.rawPacket.header.ipHeader.ip_dst.s_addr = data->dstAddr;
+    ip.rawPacket.header.sPort = data->srcPort;
+    ip.rawPacket.header.dPort = data->dstPort;
 
     traffCnt->Process(ip);
     }
 
     traffCnt->Process(ip);
     }
index 3b5313530bc9d020e9af674aad0283f9f9812007..e6961643bde97479382e796375afc0bf807eb478 100644 (file)
@@ -106,6 +106,9 @@ public:
     uint16_t        GetStopPosition() const { return STOP_POS; }
 
 private:
     uint16_t        GetStopPosition() const { return STOP_POS; }
 
 private:
+    NF_CAP(const NF_CAP & rvalue);
+    NF_CAP & operator=(const NF_CAP & rvalue);
+
     TRAFFCOUNTER * traffCnt;
     MODULE_SETTINGS settings;
     pthread_t tidTCP;
     TRAFFCOUNTER * traffCnt;
     MODULE_SETTINGS settings;
     pthread_t tidTCP;
index 603c520994bf11fa8075f4f36a0ab41ffa7d4343..98bf1b6c0c3e4340e1e81a462a8e318aed97773a 100644 (file)
@@ -80,7 +80,10 @@ return "Divert_cap v.1.0";
 }
 //-----------------------------------------------------------------------------
 DIVERT_CAP::DIVERT_CAP()
 }
 //-----------------------------------------------------------------------------
 DIVERT_CAP::DIVERT_CAP()
-    : port(0),
+    : settings(),
+      port(0),
+      errorStr(),
+      thread(),
       nonstop(false),
       isRunning(false),
       traffCnt(NULL)
       nonstop(false),
       isRunning(false),
       traffCnt(NULL)
index 432ee4b1a27ea55c37a0d18aaed7bb52fe3b77e7..65ee87d39404a1fdccfd28dc50b01891c25d26b4 100644 (file)
@@ -63,6 +63,9 @@ public:
     uint16_t            GetStopPosition() const { return 10; }
 
 private:
     uint16_t            GetStopPosition() const { return 10; }
 
 private:
+    DIVERT_CAP(const DIVERT_CAP & rvalue);
+    DIVERT_CAP & operator=(const DIVERT_CAP & rvalue);
+
     static void *       Run(void *);
 
     int                 DivertCapOpen();
     static void *       Run(void *);
 
     int                 DivertCapOpen();
index 20ca24809a3696abd9eb540818751f4f44b17108..c415e6919e9cf4d8a16934d9745e9b22cc4160c7 100644 (file)
@@ -117,9 +117,15 @@ return "bpf_cap v.1.0";
 }
 //-----------------------------------------------------------------------------
 BPF_CAP::BPF_CAP()
 }
 //-----------------------------------------------------------------------------
 BPF_CAP::BPF_CAP()
-    : nonstop(false),
+    : capSettings(),
+      errorStr(),
+      bpfData(),
+      polld(),
+      thread(),
+      nonstop(false),
       isRunning(false),
       capSock(-1),
       isRunning(false),
       capSock(-1),
+      settings(),
       traffCnt(NULL)
 {
 }
       traffCnt(NULL)
 {
 }
index b51cc56d72329431a9a8bf1e39a2adf2f4c8e086..8f7e1f2fdd1693e8954047442b11ad559c9ad4fe 100644 (file)
@@ -111,6 +111,9 @@ public:
     uint16_t            GetStopPosition() const { return 10; }
 
 private:
     uint16_t            GetStopPosition() const { return 10; }
 
 private:
+    BPF_CAP(const BPF_CAP & rvalue);
+    BPF_CAP & operator=(const BPF_CAP & rvalue);
+
     static void *       Run(void *);
     int                 BPFCapOpen();
     int                 BPFCapOpen(BPF_DATA * bd);
     static void *       Run(void *);
     int                 BPFCapOpen();
     int                 BPFCapOpen(BPF_DATA * bd);
index d45b175501dc5ed3d817b3b5990c9ddc10bb7e1f..97e9b17119a7eb8fb505579b82d0abeb20d1f995 100644 (file)
@@ -72,7 +72,9 @@ return "Ether_cap v.1.2";
 }
 //-----------------------------------------------------------------------------
 ETHER_CAP::ETHER_CAP()
 }
 //-----------------------------------------------------------------------------
 ETHER_CAP::ETHER_CAP()
-    : nonstop(false),
+    : errorStr(),
+      thread(),
+      nonstop(false),
       isRunning(false),
       capSock(-1),
       traffCnt(NULL)
       isRunning(false),
       capSock(-1),
       traffCnt(NULL)
index 994fea8ac167ffc591db5823994c2696cfd64cf6..64560ca4f657135df1da6ad4b8677ae4f085d857 100644 (file)
@@ -63,6 +63,9 @@ public:
     uint16_t            GetStopPosition() const { return 10; }
 
 private:
     uint16_t            GetStopPosition() const { return 10; }
 
 private:
+    ETHER_CAP(const ETHER_CAP & rvalue);
+    ETHER_CAP & operator=(const ETHER_CAP & rvalue);
+
     static void *       Run(void *);
     int                 EthCapOpen();
     int                 EthCapClose();
     static void *       Run(void *);
     int                 EthCapOpen();
     int                 EthCapClose();
index de5cd0ed2cdde2bfb23efc3caaccb54167fc0102..7f60c7eb7123bc7578bd011de08eabc7d0e21d5f 100644 (file)
@@ -54,10 +54,13 @@ return "ipq_cap v.1.2";
 //-----------------------------------------------------------------------------
 IPQ_CAP::IPQ_CAP()
     : ipq_h(NULL),
 //-----------------------------------------------------------------------------
 IPQ_CAP::IPQ_CAP()
     : ipq_h(NULL),
+      errorStr(),
+      thread(),
       nonstop(false),
       isRunning(false),
       capSock(-1),
       nonstop(false),
       isRunning(false),
       capSock(-1),
-      traffCnt(NULL)
+      traffCnt(NULL),
+      buf()
 {
 memset(buf, 0, BUFSIZE);
 }
 {
 memset(buf, 0, BUFSIZE);
 }
index 990aae3b1372b2a66c6e19f330edb1845049644c..308234b474b5acb3f0df11ec89a5809f7b29dddc 100644 (file)
@@ -58,6 +58,9 @@ public:
     uint16_t GetStopPosition() const { return 10; }
 
 private:
     uint16_t GetStopPosition() const { return 10; }
 
 private:
+    IPQ_CAP(const IPQ_CAP & rvalue);
+    IPQ_CAP & operator=(const IPQ_CAP & rvalue);
+
     static void * Run(void *);
     int IPQCapOpen();
     int IPQCapClose();
     static void * Run(void *);
     int IPQCapOpen();
     int IPQCapClose();
index 4621388ee6fd0771e7d51e136133895955d5c232..7a8d0b8d30113a80431a1ab1ccd2f1519fcdddbd 100644 (file)
@@ -38,9 +38,8 @@
 
 #endif
 
 
 #endif
 
-#include "stg/noncopyable.h"
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-class STG_LOCKER : private NONCOPYABLE
+class STG_LOCKER
 {
 public:
     #ifdef DEBUG_LOCKER
 {
 public:
     #ifdef DEBUG_LOCKER
@@ -48,6 +47,7 @@ public:
         : mutex(m),
           file(__file__),
           line(__line__),
         : mutex(m),
           file(__file__),
           line(__line__),
+          lockerMutex(),
           lockID(0)
     #else
     STG_LOCKER(pthread_mutex_t * m, const char *, int)
           lockID(0)
     #else
     STG_LOCKER(pthread_mutex_t * m, const char *, int)
@@ -79,6 +79,9 @@ public:
         #endif
         };
 private:
         #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;
     pthread_mutex_t * mutex;
     #ifdef DEBUG_LOCKER
     std::string file;
index 18c9de7eaaef636ac69029fad6cf1d9a5a300cba..215c63925fee21e6efea4926531bd5aa0f397154 100644 (file)
@@ -15,7 +15,8 @@ return logger;
 }
 //-----------------------------------------------------------------------------
 STG_LOGGER::STG_LOGGER()
 }
 //-----------------------------------------------------------------------------
 STG_LOGGER::STG_LOGGER()
-    : fileName()
+    : fileName(),
+      mutex()
 {
 pthread_mutex_init(&mutex, NULL);
 }
 {
 pthread_mutex_init(&mutex, NULL);
 }
index f8375b065ca7b2dc657b2aa109369d098d8fb3cc..9fe1487842188e29699d3e0deaab8c01e7730b17 100644 (file)
@@ -5,19 +5,21 @@
 
 #include <string>
 
 
 #include <string>
 
-#include "stg/noncopyable.h"
-
 const char * LogDate(time_t t);
 //-----------------------------------------------------------------------------
 class STG_LOGGER;
 STG_LOGGER & GetStgLogger();
 //-----------------------------------------------------------------------------
 const char * LogDate(time_t t);
 //-----------------------------------------------------------------------------
 class STG_LOGGER;
 STG_LOGGER & GetStgLogger();
 //-----------------------------------------------------------------------------
-class STG_LOGGER_LOCKER : private NONCOPYABLE
+class STG_LOGGER_LOCKER
 {
 public:
     STG_LOGGER_LOCKER(pthread_mutex_t * m) : mutex(m) { pthread_mutex_lock(mutex); };
     ~STG_LOGGER_LOCKER() { pthread_mutex_unlock(mutex); };
 {
 public:
     STG_LOGGER_LOCKER(pthread_mutex_t * m) : mutex(m) { pthread_mutex_lock(mutex); };
     ~STG_LOGGER_LOCKER() { pthread_mutex_unlock(mutex); };
+
 private:
 private:
+    STG_LOGGER_LOCKER(const STG_LOGGER_LOCKER & rvalue);
+    STG_LOGGER_LOCKER & operator=(const STG_LOGGER_LOCKER & rvalue);
+
     pthread_mutex_t * mutex;
 };
 //-----------------------------------------------------------------------------
     pthread_mutex_t * mutex;
 };
 //-----------------------------------------------------------------------------
@@ -32,6 +34,9 @@ public:
 
 private:
     STG_LOGGER();
 
 private:
     STG_LOGGER();
+    STG_LOGGER(const STG_LOGGER & rvalue);
+    STG_LOGGER & operator=(const STG_LOGGER & rvalue);
+
     const char * LogDate(time_t t);
 
     std::string fileName;
     const char * LogDate(time_t t);
 
     std::string fileName;
index 216b5977e5b7efbf3ddb4dc4a56be20972fcf3b9..f36868063a2b2a02d6ad1c99e00b32e02a454e13 100644 (file)
@@ -30,7 +30,15 @@ STG_PINGER::STG_PINGER(time_t d)
       isRunningSender(false),
       sendSocket(-1),
       recvSocket(-1),
       isRunningSender(false),
       sendSocket(-1),
       recvSocket(-1),
-      pid(0)
+      sendThread(),
+      recvThread(),
+      pmSend(),
+      pid(0),
+      errorStr(),
+      pingIP(),
+      ipToAdd(),
+      ipToDel(),
+      mutex()
 {
     pthread_mutex_init(&mutex, NULL);
     memset(&pmSend, 0, sizeof(pmSend));
 {
     pthread_mutex_init(&mutex, NULL);
     memset(&pmSend, 0, sizeof(pmSend));