Explorar el Código

Making AVG_NUM configurable by compiler define (Submitted by Lars)

A minor change which makes the AVG_NUM configurable by compiler define.
Partly Closed #956 and Closes #1166
Jan Wagner hace 12 años
padre
commit
c5dc81cd28
Se han modificado 2 ficheros con 4 adiciones y 0 borrados
  1. 2 0
      plugins/check_ntp.c
  2. 2 0
      plugins/check_ntp_time.c

+ 2 - 0
plugins/check_ntp.c

@@ -54,7 +54,9 @@ void print_help (void);
 void print_usage (void);
 
 /* number of times to perform each request to get a good average. */
+#ifndef AVG_NUM
 #define AVG_NUM 4
+#endif
 
 /* max size of control message data */
 #define MAX_CM_SIZE 468

+ 2 - 0
plugins/check_ntp_time.c

@@ -55,7 +55,9 @@ void print_help (void);
 void print_usage (void);
 
 /* number of times to perform each request to get a good average. */
+#ifndef AVG_NUM
 #define AVG_NUM 4
+#endif
 
 /* max size of control message data */
 #define MAX_CM_SIZE 468