Explorar o código

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.
Holger Weiss %!s(int64=12) %!d(string=hai) anos
pai
achega
6f0366c8b8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugins/check_pgsql.c

+ 1 - 1
plugins/check_pgsql.c

@@ -258,7 +258,7 @@ main (int argc, char **argv)
 	if (verbose)
 	if (verbose)
 		printf("Closing connection\n");
 		printf("Closing connection\n");
 	PQfinish (conn);
 	PQfinish (conn);
-	return (query_status > status) ? query_status : status;
+	return (pgquery && query_status > status) ? query_status : status;
 }
 }