git repos / oastat

commit 16b32974

sago007 · 2011-01-15 19:48
16b32974838b20151f4ee11b304411096970d248 patch · browse files
parent d08f365e262d6a36cf3762405b0f0dfa8b86289c

Forgot to replace the conditions to match the individual commands


git-svn-id: http://oastat.googlecode.com/svn/trunk@14 a36be8df-c75f-1e49-46ad-4f0ee64bdc62

Changed files

M src/oss2db/Award2Db.cpp before
M src/oss2db/Ctf1f2Db.cpp before
M src/oss2db/Ctf2Db.cpp before
M src/oss2db/Elimination2Db.cpp before
M src/oss2db/Point2Db.cpp before
M src/oss2db/init2db.cpp before
M src/oss2db/kill2db.cpp before
M src/oss2db/shutdown2db.cpp before
diff --git a/src/oss2db/Award2Db.cpp b/src/oss2db/Award2Db.cpp index 314639e..e392d97 100644 --- a/src/oss2db/Award2Db.cpp +++ b/src/oss2db/Award2Db.cpp
@@ -23,7 +23,7 @@ string Award2Db::getCommand() {
}
bool Award2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand() || oss.parameters.size()<2 || oss.parameters.at(0)<0)
return false;
return true;
}
diff --git a/src/oss2db/Ctf1f2Db.cpp b/src/oss2db/Ctf1f2Db.cpp index a28f591..3776aca 100644 --- a/src/oss2db/Ctf1f2Db.cpp +++ b/src/oss2db/Ctf1f2Db.cpp
@@ -21,7 +21,7 @@ string Ctf1f2Db::getCommand() {
}
bool Ctf1f2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand() || oss.parameters.size()<3 || oss.parameters.at(0)<0)
return false;
return true;
}
diff --git a/src/oss2db/Ctf2Db.cpp b/src/oss2db/Ctf2Db.cpp index 12f2311..8b0a247 100644 --- a/src/oss2db/Ctf2Db.cpp +++ b/src/oss2db/Ctf2Db.cpp
@@ -22,7 +22,7 @@ string Ctf2Db::getCommand() {
}
bool Ctf2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand() || oss.parameters.size()<3 || oss.parameters.at(0)<0)
return false;
return true;
}
diff --git a/src/oss2db/Elimination2Db.cpp b/src/oss2db/Elimination2Db.cpp index 461a44b..925b43f 100644 --- a/src/oss2db/Elimination2Db.cpp +++ b/src/oss2db/Elimination2Db.cpp
@@ -21,7 +21,7 @@ string Elimination2Db::getCommand() {
}
bool Elimination2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand() || oss.parameters.size()<3 || oss.parameters.at(0)<0 )
return false;
return true;
}
diff --git a/src/oss2db/Point2Db.cpp b/src/oss2db/Point2Db.cpp index 358fb28..ecf5601 100644 --- a/src/oss2db/Point2Db.cpp +++ b/src/oss2db/Point2Db.cpp
@@ -21,7 +21,7 @@ string Point2Db::getCommand() {
}
bool Point2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand() || oss.parameters.size()<2 || oss.parameters.at(0)<0)
return false;
return true;
}
diff --git a/src/oss2db/init2db.cpp b/src/oss2db/init2db.cpp index 198cbf9..310f44e 100644 --- a/src/oss2db/init2db.cpp +++ b/src/oss2db/init2db.cpp
@@ -36,7 +36,7 @@ string Init2Db::getCommand() {
}
bool Init2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand())
return false;
return true;
}
diff --git a/src/oss2db/kill2db.cpp b/src/oss2db/kill2db.cpp index 6ab2362..86e7031 100644 --- a/src/oss2db/kill2db.cpp +++ b/src/oss2db/kill2db.cpp
@@ -27,7 +27,7 @@ string Kill2Db::getCommand() {
}
bool Kill2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand() || oss.parameters.size()<=3)
return false;
return true;
}
diff --git a/src/oss2db/shutdown2db.cpp b/src/oss2db/shutdown2db.cpp index 98cec78..5fd454d 100644 --- a/src/oss2db/shutdown2db.cpp +++ b/src/oss2db/shutdown2db.cpp
@@ -36,7 +36,7 @@ string Shutdown2Db::getCommand() {
}
bool Shutdown2Db::canProcess(OaStatStruct oss) {
- if(oss.command != getCommand() || oss.parameters.size()<1)
+ if(oss.command != getCommand())
return false;
return true;
}