commit b9e037ce4a48cabc1b3df45b676ecdaad1323dde parent e137d345f47aee2f571d0f852fb9cfef6590d8bf Author: finwo <finwo@pm.me> Date: Sat, 3 Jan 2026 19:34:37 +0100 1.76 Diffstat:
133 files changed, 330 insertions(+), 320 deletions(-)
diff --git a/ChangeLog b/ChangeLog @@ -2,6 +2,11 @@ ChangeLog for Crossroads ------------------------------------------------------------------------------ +1.76 [KK 2008-01-31] + - Parser again made stricter: a backend's maxconnections is not allowed + when the service's dispatch type is an external handler. + - Porting issues for gcc 4.0.2 (default at MacOSX Leopard) solved. + 1.75 [KK 2008-01-25] - Changed chunked transfer copying in HTTP mode. The trailing \r\n, following a zero-bytes chunk, also gets handled in diff --git a/doc/crossroads.conf.7 b/doc/crossroads.conf.7 @@ -820,12 +820,14 @@ connection\&. .PP \fBmaxconnections - Limiting the connections to a back end\fP .IP "Description:" -The directive \f(CWmaxconnections\fP can also occur on the level of -back ends\&. In this case it limits the number of allowed +The directive \f(CWmaxconnections\fP limits the number of allowed connections to this client\&. -.IP Note that this directive can also occur on the level of a service block, in which case it limits the overall number of connections\&. +.IP +\fBFuthermore note\fP that this directive cannot be used when an external +dispatcher is in effect\&. In such cases, the external dispatcher has +full control over backend selection\&. .IP "Syntax:" \f(CWmaxconnections\fP \fInumber\fP \f(CW;\fP .IP "Default:" diff --git a/doc/crossroads.html b/doc/crossroads.html @@ -1,12 +1,12 @@ <a name="../crossroads-defs"></a><a name="defs"></a><html><head> -<title>Crossroads 1.75</title> +<title>Crossroads 1.76</title> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rev="made" href="mailto:info@e-tunity.com"> </head> <body> <hr> -<h1>Crossroads 1.75</h1> +<h1>Crossroads 1.76</h1> <h2>Karel Kubat <br> Maintained by Karel Kubat (karel@kubat.nl)</h2> @@ -216,7 +216,7 @@ in <a href="crossroads.pdf">PDF</a> format. As quick reference, here are some important URL's for Crossroads: <p> <ul> - <li> <a href="http:/crossroads.e-tunity.com">http:/crossroads.e-tunity.com</a> is the site that serves + <li> <a href="http://crossroads.e-tunity.com">http://crossroads.e-tunity.com</a> is the site that serves Crossroads. You can browse this at leisure for documentation, sources, and so on. <p> @@ -1486,12 +1486,14 @@ i.e., when the service is declared with <code>type http</code>. Incase of <a name="conf/maxcon-client.yo"></a><a name="l46"></a> <strong>4.4.5: maxconnections - Limiting the connections to a back end</strong> <a name="confmaxconnections - Limiting the connections to a back end"></a> <dl> - <p><dt><strong>Description:</strong><dd> The directive <code>maxconnections</code> can also occur on the level of - back ends. In this case it limits the number of allowed + <p><dt><strong>Description:</strong><dd> The directive <code>maxconnections</code> limits the number of allowed connections to this client. -<p> -Note that this directive can also occur on the level of a service + Note that this directive can also occur on the level of a service block, in which case it limits the overall number of connections. +<p> +<strong>Futhermore note</strong> that this directive cannot be used when an external + dispatcher is in effect. In such cases, the external dispatcher has + full control over backend selection. <p><dt><strong>Syntax:</strong><dd> <code>maxconnections</code> <em>number</em> <code>;</code> <p><dt><strong>Default:</strong><dd> 0; meaning no limit </dl> diff --git a/doc/crossroads.pdf b/doc/crossroads.pdf Binary files differ. diff --git a/doc/main/conf/maxcon-client.yo b/doc/main/conf/maxcon-client.yo @@ -1,11 +1,13 @@ conf(maxconnections - Limiting the connections to a back end) - (The directive tt(maxconnections) can also occur on the level of - back ends. In this case it limits the number of allowed + (The directive tt(maxconnections) limits the number of allowed connections to this client. - Note that this directive can also occur on the level of a service - block, in which case it limits the overall number of connections.) + block, in which case it limits the overall number of connections. + + bf(Futhermore note) that this directive cannot be used when an external + dispatcher is in effect. In such cases, the external dispatcher has + full control over backend selection.) (tt(maxconnections) em(number) tt(;)) (0; meaning no limit) - -\ No newline at end of file + diff --git a/doc/main/intro.yo b/doc/main/intro.yo @@ -30,7 +30,7 @@ subsect(Obtaining Crossroads) As quick reference, here are some important URL's for Crossroads: itemization( - it() lurl(http:/crossroads.e-tunity.com) is the site that serves + it() lurl(http://crossroads.e-tunity.com) is the site that serves Crossroads. You can browse this at leisure for documentation, sources, and so on. diff --git a/etc/Makefile.def b/etc/Makefile.def @@ -6,7 +6,7 @@ # Versioning. This defines the overall version ID and must match the topmost # entry in the ChangeLog. -VER = 1.75 +VER = 1.76 # Years that Crossroads has been 'round. YEARS = 2005-2007 diff --git a/etc/svnrev.txt b/etc/svnrev.txt @@ -1 +1 @@ -224 +225 diff --git a/src/crossroads-daemon/main.c b/src/crossroads-daemon/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/crossroads.h b/src/crossroads.h @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -514,7 +514,7 @@ extern char *strupr (char *buf); /* strnstr() if it's missing on this system */ #if HAVE_STRNSTR == 0 -extern char *strnstr (char const *buf, char const *little, unsigned len); +extern char *strnstr (char const *buf, char const *little, size_t len); #endif /* __progname_full on systems that have it */ diff --git a/src/crossroads/main.c b/src/crossroads/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/allocreporter.c b/src/lib/allocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ansistamp.c b/src/lib/ansistamp.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendavailable.c b/src/lib/backendavailable.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendconnect.c b/src/lib/backendconnect.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendcount.c b/src/lib/backendcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/checkservice.c b/src/lib/checkservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/choosebackend.c b/src/lib/choosebackend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -71,16 +71,17 @@ void choose_backend () { } } - /* When we don't have any active back ends, then we sleep a bit. */ - if (!nbackends) + /* When we don't have any active back ends, then we sleep a bit. + * Abort choosing a back end, unless there is an external dispatcher - + * it may overrule our assumptions. */ + if (!nbackends) { sleep (RETRY_WAIT); - - /* No backends? Nogo. Unless there is external dispatching. */ - if (nbackends == 0 && activeservice->dispatchtype != ds_externalhandler) { - current_backend = -1; - warning ("Service %s: No active backends to select!", - activeservice->name); - return; + if (activeservice->dispatchtype != ds_externalhandler) { + current_backend = -1; + warning ("Service %s: No active backends to select!", + activeservice->name); + return; + } } /* Only one backend? Then it's always the first one, whatever diff --git a/src/lib/cmdconfigtest.c b/src/lib/cmdconfigtest.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/cmdrestart.c b/src/lib/cmdrestart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/cmdservices.c b/src/lib/cmdservices.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/cmdstart.c b/src/lib/cmdstart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/cmdstatus.c b/src/lib/cmdstatus.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/cmdstop.c b/src/lib/cmdstop.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/cmdtell.c b/src/lib/cmdtell.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configmsg.c b/src/lib/configmsg.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configread.c b/src/lib/configread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configwrite.c b/src/lib/configwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/copysockets.c b/src/lib/copysockets.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/data.c b/src/lib/data.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/deallocreporter.c b/src/lib/deallocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/decrclientcount.c b/src/lib/decrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/dns.c b/src/lib/dns.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/error.c b/src/lib/error.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/gmtstamp.c b/src/lib/gmtstamp.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/hashpjw.c b/src/lib/hashpjw.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpcopy.c b/src/lib/httpcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httperror.c b/src/lib/httperror.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderaddheader.c b/src/lib/httpheaderaddheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderappendheader.c b/src/lib/httpheaderappendheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderconnectiontype.c b/src/lib/httpheaderconnectiontype.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderfree.c b/src/lib/httpheaderfree.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderhascookie.c b/src/lib/httpheaderhascookie.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderhttpver.c b/src/lib/httpheaderhttpver.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheadernew.c b/src/lib/httpheadernew.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderread.c b/src/lib/httpheaderread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderremoveheader.c b/src/lib/httpheaderremoveheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheadersetheader.c b/src/lib/httpheadersetheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderval.c b/src/lib/httpheaderval.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderwrite.c b/src/lib/httpheaderwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpinsertheader.c b/src/lib/httpinsertheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httplogactivity.c b/src/lib/httplogactivity.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -31,7 +31,7 @@ void http_log_activity (double start, double now, char const *fmt, ...) { #if HAVE_FLOCK == 1 flock (fileno(f), LOCK_EX); -#elif HAVE_LOCKF === 1 +#elif HAVE_LOCKF == 1 lockf (fileno(f), F_LOCK, 0); #endif diff --git a/src/lib/httpserve.c b/src/lib/httpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpserversocket.c b/src/lib/httpserversocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpwrite.c b/src/lib/httpwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/incrclientcount.c b/src/lib/incrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/initsockaddr.c b/src/lib/initsockaddr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/interrupt.c b/src/lib/interrupt.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfaddallow.c b/src/lib/ipfaddallow.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfadddeny.c b/src/lib/ipfadddeny.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfallowed.c b/src/lib/ipfallowed.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfdenied.c b/src/lib/ipfdenied.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfloadfile.c b/src/lib/ipfloadfile.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfmatch.c b/src/lib/ipfmatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfparse.c b/src/lib/ipfparse.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ishexdigit.c b/src/lib/ishexdigit.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/isspace.c b/src/lib/isspace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/lexer.c b/src/lib/lexer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/lockreporter.c b/src/lib/lockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivityany.c b/src/lib/logactivityany.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivitycontinuation.c b/src/lib/logactivitycontinuation.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivityend.c b/src/lib/logactivityend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivitystart.c b/src/lib/logactivitystart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/makesocket.c b/src/lib/makesocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/markactivity.c b/src/lib/markactivity.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/msg.c b/src/lib/msg.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/msgdumpbuf.c b/src/lib/msgdumpbuf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netallocbufs.c b/src/lib/netallocbufs.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netbuffer.c b/src/lib/netbuffer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netbufread.c b/src/lib/netbufread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netcopy.c b/src/lib/netcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netread.c b/src/lib/netread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netwrite.c b/src/lib/netwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/optionsread.c b/src/lib/optionsread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/optionswrite.c b/src/lib/optionswrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parser.c b/src/lib/parser.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -338,20 +338,20 @@ static const short yyrline[] = { 0, 196, 198, 200, 202, 204, 208, 217, 225, 233, 241, 249, 258, 267, 291, 296, 307, 310, 314, 319, 325, 331, 337, 347, 355, 362, 368, 374, 380, 386, 392, - 398, 404, 410, 416, 422, 429, 615, 627, 639, 648, - 655, 660, 673, 677, 683, 692, 694, 696, 702, 719, - 726, 736, 745, 749, 753, 757, 761, 765, 769, 773, - 779, 791, 800, 818, 836, 838, 844, 853, 865, 877, - 889, 901, 913, 918, 922, 928, 940, 945, 949, 955, - 967, 979, 991, 1003, 1012, 1022, 1034, 1042, 1048, 1055, - 1060, 1065, 1070, 1075, 1080, 1085, 1090, 1095, 1100, 1105, - 1110, 1115, 1120, 1125, 1130, 1135, 1140, 1145, 1150, 1155, - 1162, 1175, 1187, 1199, 1205, 1217, 1229, 1234, 1238, 1242, - 1248, 1260, 1272, 1284, 1296, 1308, 1320, 1329, 1338, 1350, - 1359, 1371, 1383, 1395, 1407, 1419, 1431, 1440, 1445, 1450, - 1455, 1460, 1465, 1470, 1475, 1480, 1485, 1490, 1495, 1500, - 1505, 1510, 1515, 1520, 1525, 1530, 1535, 1540, 1545, 1550, - 1554, 1558 + 398, 404, 410, 416, 422, 429, 603, 615, 627, 636, + 643, 648, 661, 665, 671, 680, 682, 684, 690, 707, + 714, 724, 733, 737, 741, 745, 749, 753, 757, 761, + 767, 779, 788, 806, 824, 826, 832, 841, 853, 865, + 877, 889, 901, 906, 910, 916, 928, 933, 937, 943, + 955, 967, 979, 991, 1000, 1010, 1022, 1030, 1036, 1043, + 1048, 1053, 1058, 1063, 1068, 1073, 1078, 1083, 1088, 1093, + 1098, 1103, 1108, 1113, 1118, 1123, 1128, 1133, 1138, 1143, + 1150, 1163, 1175, 1187, 1193, 1205, 1217, 1222, 1226, 1230, + 1236, 1248, 1260, 1272, 1284, 1296, 1308, 1317, 1326, 1338, + 1347, 1359, 1371, 1383, 1395, 1407, 1419, 1428, 1433, 1438, + 1443, 1448, 1453, 1458, 1463, 1468, 1473, 1478, 1483, 1488, + 1493, 1498, 1503, 1508, 1513, 1518, 1523, 1528, 1533, 1538, + 1542, 1546 }; #endif @@ -1504,26 +1504,14 @@ case 46: if (!cur_backend.initial_port) error ("Service %s: back end %s lacks port", cur_service.name, cur_backend.name); + if (cur_service.dispatchext && cur_backend.maxconnections) + error ("Service %s: back end %s defines maxconnections, " + "but an external dispatcher is in effect", + cur_service.name, cur_backend.name); if (cur_backend.weight < 1) cur_backend.weight = 1; if (cur_backend.retries < 1) cur_backend.retries = 1; - /* - if (! cur_backend.onstart) - cur_backend.onstart = xstrdup (""); - if (! cur_backend.onfail) - cur_backend.onfail = xstrdup (""); - if (! cur_backend.onend) - cur_backend.onend = xstrdup (""); - if (! cur_backend.thruputfile) - cur_backend.thruputfile = xstrdup (""); - if (! cur_backend.timinglog) - cur_backend.timinglog = xstrdup (""); - if (! cur_backend.dumpfile) - cur_backend.dumpfile = xstrdup (""); - if (! cur_backend.stickycookie) - cur_backend.stickycookie = xstrdup (""); - */ /* Add to the list. */ cur_service.backend = xrealloc (cur_service.backend, @@ -1536,7 +1524,7 @@ case 46: ; break;} case 47: -#line 618 "parser.y" +#line 606 "parser.y" { pmsg ("port statement [%d]\n", lastnr); yyval.n = 1; @@ -1546,7 +1534,7 @@ case 47: ; break;} case 48: -#line 630 "parser.y" +#line 618 "parser.y" { pmsg ("bindto statement [%d]\n", laststr); yyval.n = 1; @@ -1556,7 +1544,7 @@ case 48: ; break;} case 49: -#line 641 "parser.y" +#line 629 "parser.y" { setlaststr (laststring); free (laststring); @@ -1564,13 +1552,13 @@ case 49: ; break;} case 50: -#line 650 "parser.y" +#line 638 "parser.y" { setlastnr (SYMBOL); ; break;} case 52: -#line 664 "parser.y" +#line 652 "parser.y" { pmsg ("verbosity statement [%d]\n", lastnr); yyval.n = 1; @@ -1580,31 +1568,31 @@ case 52: ; break;} case 53: -#line 674 "parser.y" +#line 662 "parser.y" { lastnr = 1; ; break;} case 54: -#line 678 "parser.y" +#line 666 "parser.y" { lastnr = 0; ; break;} case 55: -#line 687 "parser.y" +#line 675 "parser.y" { yyval = yyvsp[-2]; ; break;} case 58: -#line 697 "parser.y" +#line 685 "parser.y" { yyval.n = 0; ; break;} case 59: -#line 704 "parser.y" +#line 692 "parser.y" { pmsg ("dispatch mode statement [%d]\n", lastnr); yyval.n = 1; @@ -1620,13 +1608,13 @@ case 59: ; break;} case 60: -#line 721 "parser.y" +#line 709 "parser.y" { setlastovernr (SYMBOL); ; break;} case 61: -#line 727 "parser.y" +#line 715 "parser.y" { pmsg ("external handler [%s]\n", laststr); if (lastnr != ds_externalhandler) @@ -1636,7 +1624,7 @@ case 61: ; break;} case 62: -#line 738 "parser.y" +#line 726 "parser.y" { yyval.n = 1; yyval.set = xmalloc (sizeof(Confset)); @@ -1644,55 +1632,55 @@ case 62: ; break;} case 63: -#line 746 "parser.y" +#line 734 "parser.y" { lastnr = ds_roundrobin; ; break;} case 64: -#line 750 "parser.y" +#line 738 "parser.y" { lastnr = ds_random; ; break;} case 65: -#line 754 "parser.y" +#line 742 "parser.y" { lastnr = ds_byduration; ; break;} case 66: -#line 758 "parser.y" +#line 746 "parser.y" { lastnr = ds_bysize; ; break;} case 67: -#line 762 "parser.y" +#line 750 "parser.y" { lastnr = ds_byorder; ; break;} case 68: -#line 766 "parser.y" +#line 754 "parser.y" { lastnr = ds_byconnections; ; break;} case 69: -#line 770 "parser.y" +#line 758 "parser.y" { lastnr = ds_externalhandler; ; break;} case 70: -#line 774 "parser.y" +#line 762 "parser.y" { lastnr = ds_byclientip; ; break;} case 71: -#line 782 "parser.y" +#line 770 "parser.y" { pmsg ("user account statement [%d]\n", laststr); yyval.n = 1; @@ -1702,7 +1690,7 @@ case 71: ; break;} case 72: -#line 793 "parser.y" +#line 781 "parser.y" { setlaststr (laststring); free (laststring); @@ -1710,7 +1698,7 @@ case 72: ; break;} case 73: -#line 804 "parser.y" +#line 792 "parser.y" { pmsg ("reviving interval statement [%d]\n", lastnr); yyval.n = 2; @@ -1725,7 +1713,7 @@ case 73: ; break;} case 74: -#line 822 "parser.y" +#line 810 "parser.y" { pmsg ("check interval [%d]\n", lastnr); yyval.n = 2; @@ -1740,13 +1728,13 @@ case 74: ; break;} case 76: -#line 839 "parser.y" +#line 827 "parser.y" { yyval.n = 0; ; break;} case 77: -#line 846 "parser.y" +#line 834 "parser.y" { yyval.n = 1; yyval.set = xmalloc (sizeof(Confset)); @@ -1754,7 +1742,7 @@ case 77: ; break;} case 78: -#line 856 "parser.y" +#line 844 "parser.y" { pmsg ("backlog statement [%d]\n", lastnr); yyval.n = 1; @@ -1764,7 +1752,7 @@ case 78: ; break;} case 79: -#line 868 "parser.y" +#line 856 "parser.y" { pmsg ("shmkey statement [%d]\n", lastnr); yyval.n = 1; @@ -1774,7 +1762,7 @@ case 79: ; break;} case 80: -#line 880 "parser.y" +#line 868 "parser.y" { pmsg ("connection timeout statement [%d]\n", lastnr); yyval.n = 1; @@ -1784,7 +1772,7 @@ case 80: ; break;} case 81: -#line 892 "parser.y" +#line 880 "parser.y" { pmsg ("max clients statement (service) [%d]\n", lastnr); yyval.n = 1; @@ -1794,7 +1782,7 @@ case 81: ; break;} case 82: -#line 904 "parser.y" +#line 892 "parser.y" { pmsg ("service type [%d]\n", lastnr); yyval.n = 1; @@ -1804,19 +1792,19 @@ case 82: ; break;} case 84: -#line 919 "parser.y" +#line 907 "parser.y" { lastnr = type_any; ; break;} case 85: -#line 923 "parser.y" +#line 911 "parser.y" { lastnr = type_http; ; break;} case 86: -#line 931 "parser.y" +#line 919 "parser.y" { pmsg ("service header inspection [%d]\n", lastnr); yyval.n = 1; @@ -1826,19 +1814,19 @@ case 86: ; break;} case 88: -#line 946 "parser.y" +#line 934 "parser.y" { lastnr = ins_deep; ; break;} case 89: -#line 950 "parser.y" +#line 938 "parser.y" { lastnr = ins_shallow; ; break;} case 90: -#line 958 "parser.y" +#line 946 "parser.y" { pmsg ("allow from [%s]\n", laststr); yyval.n = 1; @@ -1848,7 +1836,7 @@ case 90: ; break;} case 91: -#line 970 "parser.y" +#line 958 "parser.y" { pmsg ("deny from [%s]\n", laststr); yyval.n = 1; @@ -1858,7 +1846,7 @@ case 91: ; break;} case 92: -#line 982 "parser.y" +#line 970 "parser.y" { pmsg ("allow file [%s]\n", laststr); yyval.n = 1; @@ -1868,7 +1856,7 @@ case 92: ; break;} case 93: -#line 994 "parser.y" +#line 982 "parser.y" { pmsg ("deny file [%s]\n", laststr); yyval.n = 1; @@ -1878,7 +1866,7 @@ case 93: ; break;} case 94: -#line 1005 "parser.y" +#line 993 "parser.y" { setlaststr (laststring); free (laststring); @@ -1886,13 +1874,13 @@ case 94: ; break;} case 95: -#line 1017 "parser.y" +#line 1005 "parser.y" { yyval = yyvsp[-1]; ; break;} case 96: -#line 1024 "parser.y" +#line 1012 "parser.y" { pmsg ("backend name [%s]\n", SYMBOL); for (i = 0; i < cur_service.nbackend; i++) @@ -1903,7 +1891,7 @@ case 96: ; break;} case 97: -#line 1036 "parser.y" +#line 1024 "parser.y" { yyvsp[-1].n++; yyvsp[-1].set = xrealloc (yyvsp[-1].set, yyvsp[-1].n * sizeof(Confset)); @@ -1912,166 +1900,166 @@ case 97: ; break;} case 98: -#line 1043 "parser.y" +#line 1031 "parser.y" { yyval = yyvsp[0]; ; break;} case 99: -#line 1050 "parser.y" +#line 1038 "parser.y" { yyval = yyvsp[0]; ; break;} case 100: -#line 1056 "parser.y" +#line 1044 "parser.y" { pmsg ("backend server [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 101: -#line 1061 "parser.y" +#line 1049 "parser.y" { pmsg ("backend port [%d]\n", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 102: -#line 1066 "parser.y" +#line 1054 "parser.y" { pmsg ("backend verbosity [%d]\n", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 103: -#line 1071 "parser.y" +#line 1059 "parser.y" { pmsg ("backend onstart [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 104: -#line 1076 "parser.y" +#line 1064 "parser.y" { pmsg ("backend onend [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 105: -#line 1081 "parser.y" +#line 1069 "parser.y" { pmsg ("backend onfail [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 106: -#line 1086 "parser.y" +#line 1074 "parser.y" { pmsg ("backend trafficlog [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 107: -#line 1091 "parser.y" +#line 1079 "parser.y" { pmsg ("backend trafficlog [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 108: -#line 1096 "parser.y" +#line 1084 "parser.y" { pmsg ("backend HTTP timing log [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 109: -#line 1101 "parser.y" +#line 1089 "parser.y" { pmsg ("backend weight [%d]\n", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 110: -#line 1106 "parser.y" +#line 1094 "parser.y" { pmsg ("backend decay [%d]\n", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 111: -#line 1111 "parser.y" +#line 1099 "parser.y" { pmsg ("backend maxconnections [%d]\n", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 112: -#line 1116 "parser.y" +#line 1104 "parser.y" { pmsg ("backend sticky cookie [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 113: -#line 1121 "parser.y" +#line 1109 "parser.y" { pmsg ("addclientheader [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 114: -#line 1126 "parser.y" +#line 1114 "parser.y" { pmsg ("setclientheader [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 115: -#line 1131 "parser.y" +#line 1119 "parser.y" { pmsg ("appendclientheader [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 116: -#line 1136 "parser.y" +#line 1124 "parser.y" { pmsg ("addserverheader [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 117: -#line 1141 "parser.y" +#line 1129 "parser.y" { pmsg ("setserverheader [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 118: -#line 1146 "parser.y" +#line 1134 "parser.y" { pmsg ("appendserverheader [%s]\n", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 119: -#line 1151 "parser.y" +#line 1139 "parser.y" { pmsg ("backend retries [%d]\n", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 120: -#line 1156 "parser.y" +#line 1144 "parser.y" { pmsg ("backend state [%d]\n", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 121: -#line 1166 "parser.y" +#line 1154 "parser.y" { pmsg ("server statement [%s]\n", laststr); yyval.n = 1; @@ -2081,7 +2069,7 @@ case 121: ; break;} case 122: -#line 1178 "parser.y" +#line 1166 "parser.y" { pmsg ("weight statement [%d]\n", lastnr); yyval.n = 1; @@ -2091,7 +2079,7 @@ case 122: ; break;} case 123: -#line 1190 "parser.y" +#line 1178 "parser.y" { pmsg ("decay statement [%d]\n", lastnr); yyval.n = 1; @@ -2101,13 +2089,13 @@ case 123: ; break;} case 124: -#line 1200 "parser.y" +#line 1188 "parser.y" { setlaststr (laststring); ; break;} case 125: -#line 1208 "parser.y" +#line 1196 "parser.y" { pmsg ("retries [%d]\n", lastnr); yyval.n = 1; @@ -2117,7 +2105,7 @@ case 125: ; break;} case 126: -#line 1220 "parser.y" +#line 1208 "parser.y" { pmsg ("state [%d]\n", lastnr); yyval.n = 1; @@ -2127,25 +2115,25 @@ case 126: ; break;} case 128: -#line 1235 "parser.y" +#line 1223 "parser.y" { lastnr = st_available; ; break;} case 129: -#line 1239 "parser.y" +#line 1227 "parser.y" { lastnr = st_unavailable; ; break;} case 130: -#line 1243 "parser.y" +#line 1231 "parser.y" { lastnr = st_down; ; break;} case 131: -#line 1251 "parser.y" +#line 1239 "parser.y" { pmsg ("onstart statement [%s]\n", laststr); yyval.n = 1; @@ -2155,7 +2143,7 @@ case 131: ; break;} case 132: -#line 1263 "parser.y" +#line 1251 "parser.y" { pmsg ("onfail statement [%s]\n", laststr); yyval.n = 1; @@ -2165,7 +2153,7 @@ case 132: ; break;} case 133: -#line 1275 "parser.y" +#line 1263 "parser.y" { pmsg ("onend statement [%s]\n", laststr); yyval.n = 1; @@ -2175,7 +2163,7 @@ case 133: ; break;} case 134: -#line 1287 "parser.y" +#line 1275 "parser.y" { pmsg ("trafficlog statement [%s]\n", laststr); yyval.n = 1; @@ -2185,7 +2173,7 @@ case 134: ; break;} case 135: -#line 1299 "parser.y" +#line 1287 "parser.y" { pmsg ("throughputlog statement [%s]\n", laststr); yyval.n = 1; @@ -2195,7 +2183,7 @@ case 135: ; break;} case 136: -#line 1311 "parser.y" +#line 1299 "parser.y" { pmsg ("httptiminglog statement [%s]\n", laststr); yyval.n = 1; @@ -2205,7 +2193,7 @@ case 136: ; break;} case 137: -#line 1322 "parser.y" +#line 1310 "parser.y" { setlaststr (laststring); free (laststring); @@ -2213,7 +2201,7 @@ case 137: ; break;} case 138: -#line 1331 "parser.y" +#line 1319 "parser.y" { setlaststr (laststring); free (laststring); @@ -2221,7 +2209,7 @@ case 138: ; break;} case 139: -#line 1341 "parser.y" +#line 1329 "parser.y" { pmsg ("insertcookie statement [%s]\n", laststr); yyval.n = 1; @@ -2231,7 +2219,7 @@ case 139: ; break;} case 140: -#line 1352 "parser.y" +#line 1340 "parser.y" { setlaststr (laststring); free (laststring); @@ -2239,7 +2227,7 @@ case 140: ; break;} case 141: -#line 1362 "parser.y" +#line 1350 "parser.y" { pmsg ("addclientheader statement [%s]\n", laststr); yyval.n = 1; @@ -2249,7 +2237,7 @@ case 141: ; break;} case 142: -#line 1374 "parser.y" +#line 1362 "parser.y" { pmsg ("setclientheader statement [%s]\n", laststr); yyval.n = 1; @@ -2259,7 +2247,7 @@ case 142: ; break;} case 143: -#line 1386 "parser.y" +#line 1374 "parser.y" { pmsg ("appendclientheader statement [%s]\n", laststr); yyval.n = 1; @@ -2269,7 +2257,7 @@ case 143: ; break;} case 144: -#line 1398 "parser.y" +#line 1386 "parser.y" { pmsg ("addserverheader statement [%s]\n", laststr); yyval.n = 1; @@ -2279,7 +2267,7 @@ case 144: ; break;} case 145: -#line 1410 "parser.y" +#line 1398 "parser.y" { pmsg ("setserverheader statement [%s]\n", laststr); yyval.n = 1; @@ -2289,7 +2277,7 @@ case 145: ; break;} case 146: -#line 1422 "parser.y" +#line 1410 "parser.y" { pmsg ("appendserverheader statement [%s]\n", laststr); yyval.n = 1; @@ -2299,7 +2287,7 @@ case 146: ; break;} case 147: -#line 1433 "parser.y" +#line 1421 "parser.y" { setlaststr (laststring); free (laststring); @@ -2307,139 +2295,139 @@ case 147: ; break;} case 148: -#line 1440 "parser.y" +#line 1428 "parser.y" { yyerrmsg = "HTTP header specifier expected"; ; break;} case 149: -#line 1445 "parser.y" +#line 1433 "parser.y" { yyerrmsg = "cookie specifier expected"; ; break;} case 150: -#line 1450 "parser.y" +#line 1438 "parser.y" { yyerrmsg = "number expected"; ; break;} case 151: -#line 1455 "parser.y" +#line 1443 "parser.y" { yyerrmsg = "hostname or IP address expected"; ; break;} case 152: -#line 1460 "parser.y" +#line 1448 "parser.y" { yyerrmsg = "'service' expected"; ; break;} case 153: -#line 1465 "parser.y" +#line 1453 "parser.y" { yyerrmsg = "backend definition statement expected"; ; break;} case 154: -#line 1470 "parser.y" +#line 1458 "parser.y" { yyerrmsg = "service body statement expected"; ; break;} case 155: -#line 1475 "parser.y" +#line 1463 "parser.y" { yyerrmsg = "semicolon (;) expected"; ; break;} case 156: -#line 1480 "parser.y" +#line 1468 "parser.y" { yyerrmsg = "'on' or 'off' expetcted"; ; break;} case 157: -#line 1485 "parser.y" +#line 1473 "parser.y" { yyerrmsg = "dispatch method expected"; ; break;} case 158: -#line 1490 "parser.y" +#line 1478 "parser.y" { yyerrmsg = "command line expected"; ; break;} case 159: -#line 1495 "parser.y" +#line 1483 "parser.y" { yyerrmsg = "file name expected"; ; break;} case 160: -#line 1500 "parser.y" +#line 1488 "parser.y" { yyerrmsg = "service name (identifier) expected"; ; break;} case 161: -#line 1505 "parser.y" +#line 1493 "parser.y" { yyerrmsg = "backend name (identifier) expected"; ; break;} case 162: -#line 1510 "parser.y" +#line 1498 "parser.y" { yyerrmsg = "IP address such as 1.2.3.4 or 'any' expected"; ; break;} case 163: -#line 1515 "parser.y" +#line 1503 "parser.y" { yyerrmsg = "Service type expected ('any', 'stickyhttp', ...)"; ; break;} case 164: -#line 1520 "parser.y" +#line 1508 "parser.y" { yyerrmsg = "Header inspection mode mode expected ('shallow' or 'deep')"; ; break;} case 165: -#line 1525 "parser.y" +#line 1513 "parser.y" { yyerrmsg = "IP filter(s) expected"; ; break;} case 166: -#line 1530 "parser.y" +#line 1518 "parser.y" { yyerrmsg = "username expected"; ; break;} case 167: -#line 1535 "parser.y" +#line 1523 "parser.y" { yyerrmsg = "state definition expected"; ; break;} case 170: -#line 1550 "parser.y" +#line 1538 "parser.y" { yyerrmsg = "'{' expected"; ; break;} case 171: -#line 1554 "parser.y" +#line 1542 "parser.y" { yyerrmsg = "'}' expected"; ; break;} case 172: -#line 1558 "parser.y" +#line 1546 "parser.y" { yyerrmsg = "option statement (logactivity, tcpbuffersize, ...) expected"; ; @@ -2666,4 +2654,4 @@ yyerrhandle: } return 1; } -#line 1561 "parser.y" +#line 1549 "parser.y" diff --git a/src/lib/parser.y b/src/lib/parser.y @@ -580,26 +580,14 @@ servicebody: if (!cur_backend.initial_port) error ("Service %s: back end %s lacks port", cur_service.name, cur_backend.name); + if (cur_service.dispatchext && cur_backend.maxconnections) + error ("Service %s: back end %s defines maxconnections, " + "but an external dispatcher is in effect", + cur_service.name, cur_backend.name); if (cur_backend.weight < 1) cur_backend.weight = 1; if (cur_backend.retries < 1) cur_backend.retries = 1; - /* - if (! cur_backend.onstart) - cur_backend.onstart = xstrdup (""); - if (! cur_backend.onfail) - cur_backend.onfail = xstrdup (""); - if (! cur_backend.onend) - cur_backend.onend = xstrdup (""); - if (! cur_backend.thruputfile) - cur_backend.thruputfile = xstrdup (""); - if (! cur_backend.timinglog) - cur_backend.timinglog = xstrdup (""); - if (! cur_backend.dumpfile) - cur_backend.dumpfile = xstrdup (""); - if (! cur_backend.stickycookie) - cur_backend.stickycookie = xstrdup (""); - */ /* Add to the list. */ cur_service.backend = xrealloc (cur_service.backend, diff --git a/src/lib/parserclose.c b/src/lib/parserclose.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserfilename.c b/src/lib/parserfilename.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserinput.c b/src/lib/parserinput.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parseropen.c b/src/lib/parseropen.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserrun.c b/src/lib/parserrun.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserskipchar.c b/src/lib/parserskipchar.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserskipline.c b/src/lib/parserskipline.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/runservice.c b/src/lib/runservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/setproctitle.c b/src/lib/setproctitle.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/setprogramtitle.c b/src/lib/setprogramtitle.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/showconfig.c b/src/lib/showconfig.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/stagetostring.c b/src/lib/stagetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/statetostring.c b/src/lib/statetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strcasestr.c b/src/lib/strcasestr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strexpandformat.c b/src/lib/strexpandformat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -13,7 +13,7 @@ char *fmt_expand (char const *s, int *skip, int fmt_number) { /* Expansion table: * %a - availability of current back end (if any), 0 not available, * %1a = first back end etc. - * %b - name of current back end (if any), %1b = first back end etc + * %b - name of current back end (if any), %1b = first back end etc. * %e - seconds since epoch, number is an addition count * %g - GMT format timestamp. The time in between is the minutes * offset into the future, so %30g is now + 1/2 hour diff --git a/src/lib/stringtostate.c b/src/lib/stringtostate.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strlcat.c b/src/lib/strlcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strnstr.c b/src/lib/strnstr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -7,7 +7,7 @@ #include "../crossroads.h" #if HAVE_STRNSTR == 0 -char *strnstr (char const *big, char const *little, unsigned len) { +char *strnstr (char const *big, char const *little, size_t len) { int i, max, llen; /* Check that we have strings */ diff --git a/src/lib/strprintf.c b/src/lib/strprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strupr.c b/src/lib/strupr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strvprintf.c b/src/lib/strvprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabend.c b/src/lib/symtabend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtablookup.c b/src/lib/symtablookup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabset.c b/src/lib/symtabset.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabstart.c b/src/lib/symtabstart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/sysrun.c b/src/lib/sysrun.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/tcpserve.c b/src/lib/tcpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/thruputlog.c b/src/lib/thruputlog.c @@ -1,12 +1,11 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ #include "../crossroads.h" void thruputlog (unsigned char const *buf, int len, CopyDirection dir) { - struct timeval tv; static double d_start = 0; double d_now; int i; @@ -35,7 +34,7 @@ void thruputlog (unsigned char const *buf, int len, CopyDirection dir) { #if HAVE_FLOCK == 1 flock (fileno(f), LOCK_EX); -#elif HAVE_LOCKF === 1 +#elif HAVE_LOCKF == 1 lockf (fileno(f), F_LOCK, 0); #endif diff --git a/src/lib/timeofday.c b/src/lib/timeofday.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/trafficlog.c b/src/lib/trafficlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/uidassume.c b/src/lib/uidassume.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/uidrestore.c b/src/lib/uidrestore.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/unlockreporter.c b/src/lib/unlockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/usage.c b/src/lib/usage.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/vsyslog.c b/src/lib/vsyslog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/wakeuphandler.c b/src/lib/wakeuphandler.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/warning.c b/src/lib/warning.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/writelog.c b/src/lib/writelog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xcalloc.c b/src/lib/xcalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xmalloc.c b/src/lib/xmalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xrealloc.c b/src/lib/xrealloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrcat.c b/src/lib/xstrcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrcatch.c b/src/lib/xstrcatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrdup.c b/src/lib/xstrdup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.75, a load balancer and fail over + * This file is part of Crosroads 1.76, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/test/allowfrom.conf b/test/allowfrom.conf @@ -0,0 +1,15 @@ +/* Test of 'allow from' on a client level. */ + +#define DEBUG on + +service testservice { + port 2222; + verbosity DEBUG; + revivinginterval 3; + allowfrom 127/8; + + backend sshd { + server localhost:22; + verbosity DEBUG; + } +} diff --git a/test/bad23.conf b/test/bad23.conf @@ -0,0 +1,9 @@ +/* A back end with maxconnctions, but there is an external handler */ +service test { + port 2000; + dispatchmode externalhandler 'bla'; + backend one { + server localhost:2001; + maxconnections 20; + } +}