From 9c60ac57415479b4bbbd837b91ff37ddf5bf061e Mon Sep 17 00:00:00 2001 From: david Date: Wed, 9 Apr 2008 23:09:21 +0000 Subject: [PATCH] Move the check for a host being timed out or completed to before the check for a minimum rate in HostScanStats::sendOK. We don't want to tell a host that has nothing to send to send something. --- scan_engine.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scan_engine.cc b/scan_engine.cc index 2e5472152..1410ebf82 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -1100,6 +1100,11 @@ bool HostScanStats::sendOK(struct timeval *when) { struct timeval probe_to, earliest_to, sendTime; long tdiff; + if (target->timedOut(&USI->now) || completed()) { + if (when) *when = USI->now; + return false; + } + /* If the group stats say we need to send a probe to enforce a minimum scanning rate, then we need to step up and send a probe. */ if (o.min_packet_send_rate != 0.0) { @@ -1110,11 +1115,6 @@ bool HostScanStats::sendOK(struct timeval *when) { } } - if (target->timedOut(&USI->now) || completed()) { - if (when) *when = USI->now; - return false; - } - if (rld.rld_waiting) { packTime = TIMEVAL_MSEC_SUBTRACT(rld.rld_waittime, USI->now); if (packTime <= 0) {