aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorfeld <feld@FreeBSD.org>2015-11-24 03:52:04 +0800
committerfeld <feld@FreeBSD.org>2015-11-24 03:52:04 +0800
commitbdee63e87c85612c85cef7f8430ab95fbc3140d5 (patch)
treebccc15918ba2afa70387d33be866497f0f5a0181 /net-mgmt
parent37f1c790cf50470b1f00b27066ddeb2c798caf8e (diff)
downloadfreebsd-ports-gnome-bdee63e87c85612c85cef7f8430ab95fbc3140d5.tar.gz
freebsd-ports-gnome-bdee63e87c85612c85cef7f8430ab95fbc3140d5.tar.zst
freebsd-ports-gnome-bdee63e87c85612c85cef7f8430ab95fbc3140d5.zip
net-mgmt/xymon-server: Patch to fix HTTP monitoring
In 4.2.23 the HTTP status codes were reworked, but a comparison mistake caused the "catch-all" for non-standard status codes was incorrect. The result is that some valid HTTP status codes may cause Xymon to report RED when they should have reported YELLOW or GREEN.
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/xymon-server/Makefile2
-rw-r--r--net-mgmt/xymon-server/files/patch-xymonnet_httpresult.c17
2 files changed, 18 insertions, 1 deletions
diff --git a/net-mgmt/xymon-server/Makefile b/net-mgmt/xymon-server/Makefile
index e9fddf3e5bd0..224624c1bcf3 100644
--- a/net-mgmt/xymon-server/Makefile
+++ b/net-mgmt/xymon-server/Makefile
@@ -2,7 +2,7 @@
PORTNAME= xymon
PORTVERSION= 4.3.23
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= net-mgmt www
MASTER_SITES= SF/xymon/Xymon/${PORTVERSION}
PKGNAMESUFFIX= -server${PKGNAMESUFFIX2}
diff --git a/net-mgmt/xymon-server/files/patch-xymonnet_httpresult.c b/net-mgmt/xymon-server/files/patch-xymonnet_httpresult.c
new file mode 100644
index 000000000000..c8cadee2606d
--- /dev/null
+++ b/net-mgmt/xymon-server/files/patch-xymonnet_httpresult.c
@@ -0,0 +1,17 @@
+--- xymonnet/httpresult.c.orig 2015-11-23 19:40:49 UTC
++++ xymonnet/httpresult.c
+@@ -64,10 +64,10 @@ static int statuscolor(testedhost_t *h,
+ break;
+ default:
+ /* Unknown or custom status */
+- result = (result < 100) ? (h->dialup ? COL_CLEAR : COL_RED) :
+- (result < 200) ? COL_YELLOW :
+- (result < 300) ? COL_GREEN :
+- (result < 400) ? COL_YELLOW :
++ result = (status < 100) ? (h->dialup ? COL_CLEAR : COL_RED) :
++ (status < 200) ? COL_YELLOW :
++ (status < 300) ? COL_GREEN :
++ (status < 400) ? COL_YELLOW :
+ COL_RED;
+ break;
+ }