diff options
author | Greg Sabino Mullane | 2011-06-22 16:02:58 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2011-06-22 16:02:58 +0000 |
commit | ce3e0d13a293b9435ff01bde2b6c140c3129b8c7 (patch) | |
tree | 1f89403d10ae192ac5f5e83857c4fc002e502ffd /check_postgres.pl | |
parent | 7fa987821bdc2b70337fc76229372cb3b2e978f5 (diff) |
Quick fix for cases when client_port is set to an empty string, per bug report 79 from Fabrice Metge
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 438f0f4b7..e9c499939 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -7405,7 +7405,8 @@ sub check_txn_idle { msg('database'), $maxr->{datname}, msg('username'), $maxr->{usename}, $maxr->{client_addr} eq '' ? '' : (sprintf ' %s:%s', msg('address'), $maxr->{client_addr}), - $maxr->{client_port} < 1 ? '' : (sprintf ' %s:%s', msg('port'), $maxr->{client_port}); + ($maxr->{client_port} eq '' or $maxr->{client_port} < 1) + ? '' : (sprintf ' %s:%s', msg('port'), $maxr->{client_port}); } ## For MRTG, we can simply exit right now |