diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-06 13:30:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-06 13:30:14 +0200 |
commit | faf8e6a7915342bfa621900f0cf6f44eed8f88d0 (patch) | |
tree | 87a39ca425d9e7c66cd4277d3ca7e2ac7a679458 | |
parent | 5886cfbcb0f9650fc538efa7d825cc4015beb5bb (diff) | |
parent | 2a7ee15b7054d0b816533b1aea766b9065aff810 (diff) | |
download | monitoring-plugins-faf8e6a7915342bfa621900f0cf6f44eed8f88d0.tar.gz |
Merge branch 'master' into merge-jitter
-rwxr-xr-x | plugins-scripts/check_ircd.pl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl index 84f20229..4822fe68 100755 --- a/plugins-scripts/check_ircd.pl +++ b/plugins-scripts/check_ircd.pl | |||
@@ -146,7 +146,6 @@ sub bindRemote ($$) | |||
146 | { | 146 | { |
147 | my ($in_remotehost, $in_remoteport) = @_; | 147 | my ($in_remotehost, $in_remoteport) = @_; |
148 | my $proto = getprotobyname('tcp'); | 148 | my $proto = getprotobyname('tcp'); |
149 | my $sockaddr; | ||
150 | my $that; | 149 | my $that; |
151 | my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost); | 150 | my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost); |
152 | 151 | ||
@@ -154,8 +153,7 @@ sub bindRemote ($$) | |||
154 | print "IRCD UNKNOWN: Could not start socket ($!)\n"; | 153 | print "IRCD UNKNOWN: Could not start socket ($!)\n"; |
155 | exit $ERRORS{"UNKNOWN"}; | 154 | exit $ERRORS{"UNKNOWN"}; |
156 | } | 155 | } |
157 | $sockaddr = 'S n a4 x8'; | 156 | $that = pack_sockaddr_in ($in_remoteport, $thataddr); |
158 | $that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr); | ||
159 | if (!connect(ClientSocket, $that)) { | 157 | if (!connect(ClientSocket, $that)) { |
160 | print "IRCD UNKNOWN: Could not connect socket ($!)\n"; | 158 | print "IRCD UNKNOWN: Could not connect socket ($!)\n"; |
161 | exit $ERRORS{"UNKNOWN"}; | 159 | exit $ERRORS{"UNKNOWN"}; |