[Nagiosplug-checkins] CVS: nagiosplug/plugins check_pgsql.c,1.5,1.6

Karl DeBisschop kdebisschop at users.sourceforge.net
Fri Feb 7 22:01:02 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv20880/plugins

Modified Files:
	check_pgsql.c 
Log Message:
use enum instead of define

Index: check_pgsql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_pgsql.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** check_pgsql.c	16 Jan 2003 06:42:24 -0000	1.5
--- check_pgsql.c	8 Feb 2003 06:00:51 -0000	1.6
***************
*** 45,49 ****
      Name or numeric IP address of machine running backend\n\
    -P, --port=INTEGER\n\
!     Port running backend (default: %s)\n\
    -d, --database=STRING\n\
      Database to check (default: %s)\n\
--- 45,49 ----
      Name or numeric IP address of machine running backend\n\
    -P, --port=INTEGER\n\
!     Port running backend (default: %d)\n\
    -d, --database=STRING\n\
      Database to check (default: %s)\n\
***************
*** 71,78 ****
  #define DEFAULT_DB "template1"
  #define DEFAULT_HOST "127.0.0.1"
! #define DEFAULT_PORT "5432"
! #define DEFAULT_WARN 2
! #define DEFAULT_CRIT 8
! #define DEFAULT_TIMEOUT 30
  
  #include "config.h"
--- 71,80 ----
  #define DEFAULT_DB "template1"
  #define DEFAULT_HOST "127.0.0.1"
! enum {
! 	DEFAULT_PORT = 5432,
! 	DEFAULT_WARN = 2,
! 	DEFAULT_CRIT = 8,
! 	DEFAULT_TIMEOUT = 30
! };
  
  #include "config.h"
***************
*** 91,95 ****
  char *pghost = NULL;						/* host name of the backend server */
  char *pgport = NULL;						/* port of the backend server */
! char default_port[4] = DEFAULT_PORT;
  char *pgoptions = NULL;
  char *pgtty = NULL;
--- 93,97 ----
  char *pghost = NULL;						/* host name of the backend server */
  char *pgport = NULL;						/* port of the backend server */
! int default_port = DEFAULT_PORT;
  char *pgoptions = NULL;
  char *pgtty = NULL;





More information about the Commits mailing list