]> git.etc.gen.nz Git - spong.git/commitdiff
added code to check_tcp() to default $timeout param if invalid or not passed
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 28 Nov 2000 20:26:13 +0000 (20:26 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 28 Nov 2000 20:26:13 +0000 (20:26 +0000)
src/spong-network.pl

index 15d7387b1f28aadf92586cb6bf124681aafba120..8b71b6f66a98d3e7e90ecf5d2b04d697e5c6466f 100755 (executable)
@@ -17,7 +17,7 @@
 # (2) Converted checks to new plugin mechanism (Stephen Johnson May 28, 1999)
 #     Added user-configurable escalation mechanism
 #
-# $Id: spong-network.pl,v 1.24 2000/10/16 15:34:32 sljohnson Exp $
+# $Id: spong-network.pl,v 1.25 2000/11/28 20:26:13 sljohnson Exp $
 
 use Carp;
 use lib "@@LIBDIR@@";
@@ -259,6 +259,8 @@ sub check_tcp {
       $ip = "$a.$b.$c.$d";
    }
 
+   $timeout = 5 if ( ! defined $timeout || $timeout <= 0)
+
    $err = 0;
    $line = "";