aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_pgsql.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-09-19 12:41:42 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-09-19 12:41:42 +0200
commit6f0366c8b8ec809c58c3604531b14133edc69bf2 (patch)
treeab02fb40707f68a2c095efe415bd5b6d16ac05a6 /plugins/check_pgsql.c
parent843bbfb75adf888b1cb0ee3b0dc8f98d70ff6dda (diff)
downloadmonitoring-plugins-6f0366c8b8ec809c58c3604531b14133edc69bf2.tar.gz
check_pgsql: Don't exit UNKNOWN instead of OK
Since commit 912df3ef9b188c82893dace1e9b56c42a558fdba, check_pgsql exited UNKNOWN instead of OK if the new --query option was *not* specified. This bug is fixed now.
Diffstat (limited to 'plugins/check_pgsql.c')
-rw-r--r--plugins/check_pgsql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 8d60701f..324bd5f4 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -258,7 +258,7 @@ main (int argc, char **argv)
if (verbose)
printf("Closing connection\n");
PQfinish (conn);
- return (query_status > status) ? query_status : status;
+ return (pgquery && query_status > status) ? query_status : status;
}