Browse Source

check_mssql.pl: switched alarm timeout

  - alarm() now uses -t option
    contributed by Bernd Arnold (wopfel@gmail.com)

    closes #991
Bernd Apfel 10 năm trước cách đây
mục cha
commit
223c594661
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      plugins-scripts/check_mssql.pl

+ 1 - 1
plugins-scripts/check_mssql.pl

@@ -54,7 +54,7 @@ $SIG{'ALRM'} = sub {
      print ("SQL UNKNOWN: ERROR connection $server (alarm timeout)\n");
      exit $ERRORS{"UNKNOWN"};
 };
-alarm($TIMEOUT);
+alarm($timeout);
 
 unless ($dbh = DBI->connect("dbi:Sybase:server=".uc($server), "$username", "$password")) {
 	printf "SQL CRITICAL: Can't connect to mssql server $DBI::errstr\n";