From: Stephen L Johnson Date: Tue, 28 Nov 2000 20:26:13 +0000 (+0000) Subject: added code to check_tcp() to default $timeout param if invalid or not passed X-Git-Tag: spong-2_7_2~53 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86ef727dc2f698aae49e4b3c991cb890f2fa3392;p=spong.git added code to check_tcp() to default $timeout param if invalid or not passed --- diff --git a/src/spong-network.pl b/src/spong-network.pl index 15d7387..8b71b6f 100755 --- a/src/spong-network.pl +++ b/src/spong-network.pl @@ -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 = "";