default to WindowsPinger even on win64

This commit is contained in:
Anton Keks 2013-03-09 17:35:36 +02:00
parent 0632701285
commit 06d440489e

View File

@ -37,10 +37,8 @@ public class PingerRegistry {
this.scannerConfig = scannerConfig;
pingers = new LinkedHashMap<String, Class<? extends Pinger>>();
if (Platform.WINDOWS) {
// this will be the preferred choice for Windows users
if (Platform.WINDOWS)
pingers.put("pinger.windows", WindowsPinger.class);
}
pingers.put("pinger.icmp", ICMPSharedPinger.class);
pingers.put("pinger.icmp2", ICMPPinger.class);
pingers.put("pinger.udp", UDPPinger.class);
@ -90,7 +88,7 @@ public class PingerRegistry {
catch (Throwable e) {
LOG.info("ICMP pinger failed: " + e);
// win32 will use native pinger, all others get combined UDP+TCP, which doesn't require special privileges
scannerConfig.selectedPinger = Platform.WINDOWS && !Platform.ARCH_64 ? "pinger.windows" : "pinger.combined";
scannerConfig.selectedPinger = Platform.WINDOWS ? "pinger.windows" : "pinger.combined";
return false;
}
}