[nagiosplug] check_pgsql: Don't exit UNKNOWN instead of OK
"Nagios Plugin Development" <[email protected]> Thu, 19 Sep 2013 10:50:26 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug Branch: master Commit: 6f0366c8b8ec809c58c3604531b14133edc69bf2 Author: Holger Weiss <[email protected]> Date: Thu Sep 19 12:41:42 2013 +0200 URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=6f0366c 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 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index 8d60701..324bd5f 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; } ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk