]> git.stg.codes - stg.git/blobdiff - projects/stargazer/user.h
Усунуто проблему race conditions у rscriptd
[stg.git] / projects / stargazer / user.h
index 8b35dbecdc7b8801a713d1479021c811b54fbc08..496baa72d547f83c714b73deba594e7c684d9ef8 100644 (file)
@@ -144,8 +144,6 @@ public:
     void            ResetPassiveTime() { passiveTime = 0; }
     void            SetPassiveTimeAsNewUser();
 
     void            ResetPassiveTime() { passiveTime = 0; }
     void            SetPassiveTimeAsNewUser();
 
-    /*void            ResetDetailStat();
-    int             SwapDetailStat();*/
     int             WriteDetailStat(bool hard = false);
 
     const TARIFF *  GetTariff() const { return tariff; }
     int             WriteDetailStat(bool hard = false);
 
     const TARIFF *  GetTariff() const { return tariff; }
@@ -205,7 +203,6 @@ private:
     int             SaveMonthStat(int month, int year);
 
     int             SendMessage(const STG_MSG & msg);
     int             SaveMonthStat(int month, int year);
 
     int             SendMessage(const STG_MSG & msg);
-    int             RemoveMessage(uint64_t) { return 0; }
     int             ScanMessage();
     time_t          lastScanMessages;
 
     int             ScanMessage();
     time_t          lastScanMessages;
 
@@ -235,13 +232,8 @@ private:
     const TARIFFS * tariffs;
     const TARIFF *  tariff;
 
     const TARIFFS * tariffs;
     const TARIFF *  tariff;
 
-    /*map<IP_DIR_PAIR, STAT_NODE>     traffStatInternal[2];
-    map<IP_DIR_PAIR, STAT_NODE> *   traffStat;
-    map<IP_DIR_PAIR, STAT_NODE> *   traffStatToWrite;
-    int                             traffStatInUse;*/
-
     TRAFF_STAT      traffStat;
     TRAFF_STAT      traffStat;
-    std::list<std::pair<time_t, TRAFF_STAT> > traffStatQueue;
+    std::pair<time_t, TRAFF_STAT> traffStatSaved;
 
     const SETTINGS * settings;
 
 
     const SETTINGS * settings;
 
@@ -249,11 +241,12 @@ private:
 
     const map<uint32_t, user_iter> * ipIndex;
 
 
     const map<uint32_t, user_iter> * ipIndex;
 
+    list<STG_MSG> messages;
+
     bool            deleted;
 
     time_t          lastWriteStat;           // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÓÔÁÔÉÓÔÉËÉ
     time_t          lastWriteDeatiledStat;   // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÄÅÔÁÌØÎÏÊ ÓÔÁÔÉÓÔÉËÉ
     bool            deleted;
 
     time_t          lastWriteStat;           // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÓÔÁÔÉÓÔÉËÉ
     time_t          lastWriteDeatiledStat;   // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÄÅÔÁÌØÎÏÊ ÓÔÁÔÉÓÔÉËÉ
-    time_t          lastSwapDeatiledStat;    // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÄÅÔÁÌØÎÏÊ ÓÔÁÔÉÓÔÉËÉ
 
     bool            writeFreeMbTraffCost;
 
 
     bool            writeFreeMbTraffCost;