]> git.stg.codes - stg.git/blobdiff - projects/stargazer/users_impl.cpp
Ticket 12. In the ReadUsers() method: the error variable added; return -1 removed
[stg.git] / projects / stargazer / users_impl.cpp
index bc440636679af8d4069cb0de6cf9c9a394f25029..14c4460438aad103277f381aa01843fbab6ad5cf 100644 (file)
@@ -344,6 +344,7 @@ if (store->GetUsersList(&usersList) < 0)
 
 user_iter ui;
 
+unsigned errors = 0;
 for (unsigned int i = 0; i < usersList.size(); i++)
     {
     USER_IMPL u(settings, store, tariffs, sysAdmin, this, m_services);
@@ -355,12 +356,14 @@ for (unsigned int i = 0; i < usersList.size(); i++)
     AddUserIntoIndexes(ui);
 
     if (ui->ReadConf() < 0)
-        return -1;
+        errors++;
 
     if (ui->ReadStat() < 0)
-        return -1;
+        errors++;
     }
 
+if (errors > 0)
+    return -1;
 return 0;
 }
 //-----------------------------------------------------------------------------