From 76b7a7383ff561d7afa64b1b9e1575e14c57a237 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 3 Jan 2009 21:29:17 +0000 Subject: [PATCH] Use pingprobe.type != PS_NONE rather than pingprobe_state != PORT_UNKNOWN when checking if a pingprobe has been set. We always use PORT_UNKNOWN during host discovery (rather than HOST_UP or HOST_DOWN) to avoid conflicts with other PORT_* constants. See the log for r8784. --- scan_engine.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scan_engine.cc b/scan_engine.cc index c1556591f..6764b411c 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -2307,7 +2307,7 @@ void HostScanStats::getTiming(struct ultra_timing_vals *tmng) { /* Use the per-host value if a pingport has been found or very few probes have been sent */ - if (target->pingprobe_state != PORT_UNKNOWN || numprobes_sent < 80) { + if (target->pingprobe.type != PS_NONE || numprobes_sent < 80) { *tmng = timing; return; } @@ -3174,7 +3174,8 @@ static void doAnyPings(UltraScanInfo *USI) { } /* Next come global pings. We never send more than one of these at at time. */ - if (USI->gstats->pinghost != NULL && USI->gstats->pinghost->target->pingprobe_state != PORT_UNKNOWN && + if (USI->gstats->pinghost != NULL && + USI->gstats->pinghost->target->pingprobe.type != PS_NONE && USI->gstats->pinghost->num_probes_active == 0 && USI->gstats->probes_sent >= USI->gstats->lastping_sent_numprobes + 20 && TIMEVAL_SUBTRACT(USI->now, USI->gstats->lastrcvd) > USI->perf.pingtime &&