mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 10:59:02 +00:00
Shortcut probe search for earliest since they are in order by send time.
This commit is contained in:
@@ -598,6 +598,9 @@ bool HostScanStats::sendOK(struct timeval *when) const {
|
||||
if (TIMEVAL_BEFORE(probe_to, earliest_to)) {
|
||||
earliest_to = probe_to;
|
||||
}
|
||||
// probes_outstanding is in order by time sent, so
|
||||
// the first one we find is the earliest.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,6 +649,9 @@ bool HostScanStats::nextTimeout(struct timeval *when) const {
|
||||
if (TIMEVAL_BEFORE(probe->sent, earliest_to)) {
|
||||
earliest_to = probe->sent;
|
||||
}
|
||||
// probes_outstanding is in order by time sent, so
|
||||
// the first one we find is the earliest.
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pending_probes) {
|
||||
|
||||
Reference in New Issue
Block a user