git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix accessing array element above array bounds in rsconf
[stg.git]
/
projects
/
stargazer
/
tariffs_impl.cpp
diff --git
a/projects/stargazer/tariffs_impl.cpp
b/projects/stargazer/tariffs_impl.cpp
index 61e3e12c88ac5a69e3c9c2e81b617838f339f2f3..a912c3387e8eb14f141b48d8cabb49e1fa7b8039 100644
(file)
--- a/
projects/stargazer/tariffs_impl.cpp
+++ b/
projects/stargazer/tariffs_impl.cpp
@@
-42,7
+42,8
@@
using namespace std;
//-----------------------------------------------------------------------------
TARIFFS_IMPL::TARIFFS_IMPL(STORE * st)
//-----------------------------------------------------------------------------
TARIFFS_IMPL::TARIFFS_IMPL(STORE * st)
- : tariffs(),
+ : TARIFFS(),
+ tariffs(),
store(st),
WriteServLog(GetStgLogger()),
strError(),
store(st),
WriteServLog(GetStgLogger()),
strError(),
@@
-85,7
+86,7
@@
for (int i = 0; i < tariffsNum; i++)
return 0;
}
//-----------------------------------------------------------------------------
return 0;
}
//-----------------------------------------------------------------------------
-
int TARIFFS_IMPL::GetTariffsNum
() const
+
size_t TARIFFS_IMPL::Count
() const
{
STG_LOCKER lock(&mutex, __FILE__, __LINE__);
return tariffs.size();
{
STG_LOCKER lock(&mutex, __FILE__, __LINE__);
return tariffs.size();
@@
-206,7
+207,7
@@
ti = find(tariffs.begin(), tariffs.end(), TARIFF_IMPL(name));
if (ti != tariffs.end())
{
if (ti != tariffs.end())
{
- strError = "Tariff \'" + name + "\' cannot be added. Tariff alredy exist.";
+ strError = "Tariff \'" + name + "\' cannot be added. Tariff alre
a
dy exist.";
WriteServLog("%s %s", admin->GetLogStr().c_str(), strError.c_str());
return -1;
}
WriteServLog("%s %s", admin->GetLogStr().c_str(), strError.c_str());
return -1;
}