From 6f0366c8b8ec809c58c3604531b14133edc69bf2 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Thu, 19 Sep 2013 12:41:42 +0200 Subject: 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. --- plugins/check_pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-74-g34f1