CYCData::findData - some log points added.
This commit is contained in:
+9
-4
@@ -86,13 +86,17 @@ std::string CYCData::getData(int index)
|
|||||||
|
|
||||||
int CYCData::findData(const std::string& data) const
|
int CYCData::findData(const std::string& data) const
|
||||||
{
|
{
|
||||||
// no commands definend
|
// no commands defined
|
||||||
if (m_cycDB.size() == 0)
|
if (m_cycDB.size() == 0) {
|
||||||
|
L.log(cyc, debug, " no commands defined");
|
||||||
return -2;
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
// skip to small search string length
|
// search skipped - string too short
|
||||||
if (data.length() < 10)
|
if (data.length() < 10) {
|
||||||
|
L.log(cyc, debug, " search skipped - string too short");
|
||||||
return -3;
|
return -3;
|
||||||
|
}
|
||||||
|
|
||||||
// prepare string for searching command
|
// prepare string for searching command
|
||||||
std::string search(data.substr(2, 8 + strtol(data.substr(8,2).c_str(), NULL, 16) * 2));
|
std::string search(data.substr(2, 8 + strtol(data.substr(8,2).c_str(), NULL, 16) * 2));
|
||||||
@@ -121,6 +125,7 @@ int CYCData::findData(const std::string& data) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// command not found
|
// command not found
|
||||||
|
L.log(cyc, debug, " command not found");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user