Просмотр исходного кода

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 12 лет назад
Родитель
Сommit
6f0366c8b8
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      plugins/check_pgsql.c

+ 1 - 1
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;
 }