From: Maxim Mamontov <faust.madf@gmail.com>
Date: Mon, 6 Jan 2014 19:18:55 +0000 (+0200)
Subject: Fixed merge issues.
X-Git-Tag: 2.409~325
X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/9fdd58e794e43fc2435265c4fb2f6933758f3c0b?ds=sidebyside

Fixed merge issues.
---

diff --git a/include/stg/user_traff.h b/include/stg/user_traff.h
index 4d5efe62..1b9e2035 100644
--- a/include/stg/user_traff.h
+++ b/include/stg/user_traff.h
@@ -27,12 +27,13 @@
 #ifndef USER_TRAFF_H
 #define USER_TRAFF_H
 
-#include <iostream>
-#include <vector>
-
+#include "resetable.h"
 #include "const.h"
 #include "os_int.h"
 
+#include <iostream>
+#include <vector>
+
 enum TRAFF_DIRECTION {TRAFF_UPLOAD, TRAFF_DOWNLOAD};
 
 class DIR_TRAFF
diff --git a/projects/stargazer/plugins/store/firebird/firebird_store.cpp b/projects/stargazer/plugins/store/firebird/firebird_store.cpp
index 8e3c9d90..37b5184f 100644
--- a/projects/stargazer/plugins/store/firebird/firebird_store.cpp
+++ b/projects/stargazer/plugins/store/firebird/firebird_store.cpp
@@ -140,7 +140,7 @@ int FIREBIRD_STORE::CheckVersion()
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
-string name;
+std::string name;
 
 try
     {
@@ -157,7 +157,7 @@ try
             st->Get(1, schemaVersion);
         }
     tr->Commit();
-    WriteServLog("FIREBIRD_STORE: Current DB schema version: %d", schemaVersion);
+    logger("FIREBIRD_STORE: Current DB schema version: %d", schemaVersion);
     }
 
 catch (IBPP::Exception & ex)
diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_users.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_users.cpp
index e48fd0d8..3f00b16b 100644
--- a/projects/stargazer/plugins/store/firebird/firebird_store_users.cpp
+++ b/projects/stargazer/plugins/store/firebird/firebird_store_users.cpp
@@ -204,8 +204,8 @@ try
                         upload = ?, \
                         download = ? \
                      where fk_stat = ? and dir_num = ?");
-        st->Set(1, (int64_t)stat.up[i]);
-        st->Set(2, (int64_t)stat.down[i]);
+        st->Set(1, (int64_t)stat.monthUp[i]);
+        st->Set(2, (int64_t)stat.monthDown[i]);
         st->Set(3, sid);
         st->Set(4, i);
         st->Execute();
@@ -421,8 +421,8 @@ try
         if (st->Fetch())
             {
             st->Get(3, dir);
-            st->Get(5, (int64_t &)stat->up[dir]);
-            st->Get(4, (int64_t &)stat->down[dir]);
+            st->Get(5, (int64_t &)stat->monthUp[dir]);
+            st->Get(4, (int64_t &)stat->monthDown[dir]);
             }
         else
             {
diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp
index 11c2def3..53de158a 100644
--- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp
+++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp
@@ -243,7 +243,7 @@ else
         }
         if (!ret)
         {
-            WriteServLog("MYSQL_STORE: Current DB schema version: %d", schemaVersion);
+            logger("MYSQL_STORE: Current DB schema version: %d", schemaVersion);
             MakeUpdates(sock);
         }
         mysql_close(sock);
@@ -600,7 +600,7 @@ if (schemaVersion  < 1)
         return -1;
         }
     schemaVersion = 1;
-    WriteServLog("MYSQL_STORE: Updated DB schema to version %d", schemaVersion);
+    logger("MYSQL_STORE: Updated DB schema to version %d", schemaVersion);
     }
 return 0;
 }
@@ -903,7 +903,7 @@ for (int i = 0; i < DIR_NUM; i++)
         mysql_close(sock);
         return -1;
         }
-    stat->down[i] = traff;
+    stat->monthDown[i] = traff;
 
     sprintf(s, "U%d", i);
     if (GetULongLongInt(row[startPos+i*2+1], &traff, 0) != 0)
@@ -913,7 +913,7 @@ for (int i = 0; i < DIR_NUM; i++)
         mysql_close(sock);
         return -1;
         }
-    stat->up[i] = traff;
+    stat->monthUp[i] = traff;
     }//for
 
 startPos += (2*DIR_NUM);
@@ -1033,10 +1033,10 @@ res = "UPDATE users SET";
 
 for (int i = 0; i < DIR_NUM; i++)
     {
-    strprintf(&param, " D%d=%lld,", i, stat.down[i]);
+    strprintf(&param, " D%d=%lld,", i, stat.monthDown[i]);
     res += param;
 
-    strprintf(&param, " U%d=%lld,", i, stat.up[i]);
+    strprintf(&param, " U%d=%lld,", i, stat.monthUp[i]);
     res += param;
     }
 
@@ -1196,10 +1196,10 @@ strprintf(&res, "INSERT INTO stat SET login='%s', month=%d, year=%d,",
     
 for (int i = 0; i < DIR_NUM; i++)
     {
-    strprintf(&param, " U%d=%lld,", i, stat.up[i]); 
+    strprintf(&param, " U%d=%lld,", i, stat.monthUp[i]); 
     res += param;
 
-    strprintf(&param, " D%d=%lld,", i, stat.down[i]);        
+    strprintf(&param, " D%d=%lld,", i, stat.monthDown[i]);        
     res += param;
     }
     
diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
index 5b55f318..3a1d7272 100644
--- a/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
+++ b/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
@@ -237,7 +237,7 @@ if (CommitTransaction())
     return -1;
     }
 
-WriteServLog("POSTGRESQL_STORE: Current DB schema version: %d", version);
+logger("POSTGRESQL_STORE: Current DB schema version: %d", version);
 
 return 0;
 }
diff --git a/projects/stargazer/user_impl.h b/projects/stargazer/user_impl.h
index 90ae01b9..150f2a8b 100644
--- a/projects/stargazer/user_impl.h
+++ b/projects/stargazer/user_impl.h
@@ -247,7 +247,6 @@ private:
     int             id;
     bool            __connected;
     USER_PROPERTY<bool> connected;
-    std::string     lastDisconnectReason;
 
     bool            enabledDirs[DIR_NUM];