1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-04 04:26:33 +00:00

Use std::multiset to keep script outputs in order instead of sorting.

This commit is contained in:
dmiller
2021-04-27 19:22:09 +00:00
parent 3adaa69cb2
commit bf9d60734d
6 changed files with 28 additions and 28 deletions

View File

@@ -116,10 +116,12 @@ void Port::freeService(bool del_service) {
void Port::freeScriptResults(void)
{
#ifndef NOLUA
while (!scriptResults.empty()) {
scriptResults.front().clear();
scriptResults.pop_front();
}
for (ScriptResults::iterator it = scriptResults.begin();
it != scriptResults.end(); it++) {
ScriptResult sr = *it;
sr.clear();
}
scriptResults.clear();
#endif
}
@@ -377,7 +379,7 @@ void PortList::addScriptResult(u16 portno, int protocol, const ScriptResult& sr)
port = createPort(portno, protocol);
port->scriptResults.push_back(sr);
port->scriptResults.insert(sr);
}
#endif