]> err.no Git - varnish/commitdiff
Use IOV_MAX as limit if it is smaller on (HTTP_HDR_MAX * 2).
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 10 Jan 2008 23:15:39 +0000 (23:15 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 10 Jan 2008 23:15:39 +0000 (23:15 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2338 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h

index 8ff828d842cd6f493fc048f70359a30c03fbcbc7..95815fc3de56c16eccf9904ec5c699f7381bb283 100644 (file)
@@ -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;