Selaa lähdekoodia

Merge pull request #527 from sawolf/526-ntp-locale

Set LC_NUMERIC to POSIX for check_ntp plugins
Sebastian Wolf 6 vuotta sitten
vanhempi
commit
8179662dd0
3 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 2 0
      NEWS
  2. 1 0
      plugins/check_ntp_peer.c
  3. 1 0
      plugins/check_ntp_time.c

+ 2 - 0
NEWS

@@ -3,6 +3,8 @@ This file documents the major additions and syntax changes between releases.
 2.3.2 2020-??-??
 2.3.2 2020-??-??
 	FIXES
 	FIXES
 	check_http: Fix host:port syntax when using -H (Isaac White)
 	check_http: Fix host:port syntax when using -H (Isaac White)
+	check_ntp_peer: Fixed improper performance data by setting LC_NUMERIC to 'C' (#526)
+	check_ntp_time: Fixed improper performance data by setting LC_NUMERIC to 'C' (#526)
 	check_mailq: Fix nullmailer regular expression to recognize minutes and seconds properly (#522)
 	check_mailq: Fix nullmailer regular expression to recognize minutes and seconds properly (#522)
 	check_icmp: Fix incorrect status when run against multiple hosts (#520)
 	check_icmp: Fix incorrect status when run against multiple hosts (#520)
 	build: Fix broken builds on some systems, including Homebrew (#508)
 	build: Fix broken builds on some systems, including Homebrew (#508)

+ 1 - 0
plugins/check_ntp_peer.c

@@ -565,6 +565,7 @@ int main(int argc, char *argv[]){
 	char *result_line, *perfdata_line;
 	char *result_line, *perfdata_line;
 
 
 	setlocale (LC_ALL, "");
 	setlocale (LC_ALL, "");
+	setlocale (LC_NUMERIC, "C");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 	textdomain (PACKAGE);
 
 

+ 1 - 0
plugins/check_ntp_time.c

@@ -576,6 +576,7 @@ int main(int argc, char *argv[]){
 	char *result_line, *perfdata_line;
 	char *result_line, *perfdata_line;
 
 
 	setlocale (LC_ALL, "");
 	setlocale (LC_ALL, "");
+	setlocale (LC_NUMERIC, "C");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 	textdomain (PACKAGE);