Commit aadf26e7 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

The value of HTTP_HDR_MAX is not visible to the preprocessor, so

(IOV_MAX < (HTTP_HDR_MAX * 2)) is equivalent to (IOV_MAX < (0 * 2)),
which obviously is never true.  Fixes #222.

Submitted by:	Jyri J. Virkki <jyri@virkki.com>


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2606 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c360e47d
......@@ -38,6 +38,7 @@
#include <pthread_np.h>
#endif
#include <stdint.h>
#include <limits.h>
#include "vqueue.h"
......@@ -50,6 +51,8 @@
#include "heritage.h"
#include "miniobj.h"
#define HTTP_HDR_MAX_VAL 32
enum {
/* Fields from the first line of HTTP proto */
HTTP_HDR_REQ,
......@@ -59,14 +62,14 @@ enum {
HTTP_HDR_RESPONSE,
/* HTTP header lines */
HTTP_HDR_FIRST,
HTTP_HDR_MAX = 32 /* XXX: should be #defined */
HTTP_HDR_MAX = HTTP_HDR_MAX_VAL
};
/* Note: intentionally not IOV_MAX unless it has to be */
#if (IOV_MAX < (HTTP_HDR_MAX * 2))
#if (IOV_MAX < (HTTP_HDR_MAX_VAL * 2))
# define MAX_IOVS IOV_MAX
#else
# define MAX_IOVS (HTTP_HDR_MAX * 2)
# define MAX_IOVS (HTTP_HDR_MAX_VAL * 2)
#endif
struct cli;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment