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

Merge pull request #521 from sawolf/520-check-icmp-multiple-hosts

Prevent this_status from getting stuck when iterating through hosts.
Sebastian Wolf 6 лет назад
Родитель
Сommit
d19874f3e7
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      NEWS
  2. 1 0
      plugins-root/check_icmp.c

+ 1 - 0
NEWS

@@ -3,6 +3,7 @@ This file documents the major additions and syntax changes between releases.
 2.3.2 2020-??-??
 	FIXES
 	check_http: Fix host:port syntax when using -H (Isaac White)
+	check_icmp: Fix incorrect status when run against multiple hosts (#520)
 	build: Fix broken builds on some systems, including Homebrew (#508)
 	perl dependencies: updated the included Module::Build to work with newer versions of perl (#505)
 	check_icmp: All performance data tags should show when packet loss is 100% (#510)

+ 1 - 0
plugins-root/check_icmp.c

@@ -1361,6 +1361,7 @@ static void finish(int sig) {
   status = STATE_OK;
   host = list;
   while (host) {
+    this_status = STATE_OK;
     if (!host->icmp_recv) {
       /* rta 0 is ofcourse not entirely correct, but will still show up
        * conspicuosly as missing entries in perfparse and cacti */