]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp
Translate and remove some comments
[stg.git] / projects / stargazer / plugins / store / postgresql / postgresql_store_users.cpp
index 0e26327b58fbeb5741ca103bdd62d50daecdccb3..7d8b3b939fa25559d1c9acb9b5860766c52cc98b 100644 (file)
@@ -906,7 +906,11 @@ for (int i = 0; i < tuples; ++i)
         }
     else
         {
-        conf->userdata[i] = PQgetvalue(result, i, 1);
+        if (num < USERDATA_NUM &&
+            num >= 0)
+            {
+            conf->userdata[num] = PQgetvalue(result, i, 1);
+            }
         }
     }
 
@@ -1330,7 +1334,7 @@ return 0;
 }
 
 //-----------------------------------------------------------------------------
-int POSTGRESQL_STORE::WriteDetailedStat(const map<IP_DIR_PAIR, STAT_NODE> * statTree,
+int POSTGRESQL_STORE::WriteDetailedStat(const map<IP_DIR_PAIR, STAT_NODE> & statTree,
                                       time_t lastStat,
                                       const string & login) const
 {
@@ -1370,7 +1374,7 @@ if (EscapeString(elogin))
 map<IP_DIR_PAIR, STAT_NODE>::const_iterator it;
 time_t currTime = time(NULL);
 
-for (it = statTree->begin(); it != statTree->end(); ++it)
+for (it = statTree.begin(); it != statTree.end(); ++it)
     {
     std::stringstream query;
     query << "INSERT INTO tb_detail_stats "