From: phk Date: Thu, 10 Jan 2008 23:15:39 +0000 (+0000) Subject: Use IOV_MAX as limit if it is smaller on (HTTP_HDR_MAX * 2). X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eef0b56229919580b20152b8a040d5fc1139f4c3;p=varnish Use IOV_MAX as limit if it is smaller on (HTTP_HDR_MAX * 2). git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2338 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index 8ff828d8..95815fc3 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -58,8 +58,12 @@ enum { HTTP_HDR_MAX = 32 /* XXX: should be #defined */ }; -/* Note: intentionally not IOV_MAX */ -#define MAX_IOVS (HTTP_HDR_MAX * 2) +/* Note: intentionally not IOV_MAX unless it has to be */ +#if (IOV_MAX < (HTTP_HDR_MAX * 2)) +# define MAX_IOVS IOV_MAX +#else +# define MAX_IOVS (HTTP_HDR_MAX * 2) +#endif struct cli; struct vsb;