Commit c230cbd0 by yahan.li

解决BUG:流式的target同时包含$和_

	修改:     RadomForestSAC/RamdomForestCalculate.cpp
	修改:     package/E3/SigerCalculation
parent ca3f1407
......@@ -258,15 +258,10 @@ void RamdomForestCalculate::SendStreamAlarminfo(const StreamInfo &alarmInfo)
QJsonObject json;
QString target = alarmInfo.target;
int pos = 0;
for (int i = 0; i < 7; i++) {
pos = target.indexOf('$', pos + 1);
if (pos == -1)
break;
}
if (pos != -1) {
target.resize(pos);
int pos1 = target.lastIndexOf('_');
if (pos1 != -1) {
int pos2 = target.lastIndexOf('_', pos1 - 1);
target.resize((pos2 != -1) ? pos2 : pos1);
}
json["source"] = STREAM_MESSAGE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment