[hobbit] route statement in bb-hosts

Henrik Stoerner henrik at hswn.dk
Wed Mar 2 22:07:06 CET 2005


On Tue, Mar 01, 2005 at 10:31:42PM -0500, Robert Edeker wrote:
> 
>   I've been trying to use the `route:` statement in bb-hosts and it's
> either not working, or I'm not understanding it correctly.

You're right - it's broken. The attached patch should fix it: Apply
with

	cd hobbit-4.0-RC4
	patch -p0 </tmp/bbnet-route.patch
	make
	make install


Regards,
Henrik
-------------- next part --------------
--- bbnet/bbtest-net.c	2005/02/22 13:59:20	1.201
+++ bbnet/bbtest-net.c	2005/03/02 21:01:54
@@ -466,10 +466,10 @@
 		if (p) sscanf(p, "%d:%d:%d", &h->badconn[0], &h->badconn[1], &h->badconn[2]);
 
 		p = bbh_custom_item(hwalk, "route:");
-		if (p) h->routerdeps = p;
+		if (p) h->routerdeps = p + strlen("route:");
 		if (routestring) {
 			p = bbh_custom_item(hwalk, routestring);
-			if (p) h->routerdeps = p;
+			if (p) h->routerdeps = p + strlen(routestring);
 		}
 
 		if (bbh_item(hwalk, BBH_FLAG_NOCONN)) h->noconn = 1;


More information about the Xymon mailing list