Explorar o 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 %!s(int64=12) %!d(string=hai) anos
pai
achega
c5dc81cd28
Modificáronse 2 ficheiros con 4 adicións e 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