From eef0b56229919580b20152b8a040d5fc1139f4c3 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 10 Jan 2008 23:15:39 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/cache.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 2.39.5