Commit 1bf7f620 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Eliminate the cache_ban.h header file, it's contents is entirely

private to cache_ban.c, so inline it there.
parent 1e10378a
......@@ -77,7 +77,6 @@ varnishd_SOURCES = \
noinst_HEADERS = \
acct_fields.h \
cache.h \
cache_ban.h \
cache_backend.h \
cache_backend_poll.h \
cache_esi.h \
......
......@@ -54,7 +54,41 @@
#include "hash_slinger.h"
#include "vre.h"
#include "cache_ban.h"
struct ban_test;
/* A ban-testing function */
typedef int ban_cond_f(const struct ban_test *bt, const struct object *o,
const struct sess *sp);
/* Each individual test to be performed on a ban */
struct ban_test {
unsigned magic;
#define BAN_TEST_MAGIC 0x54feec67
VTAILQ_ENTRY(ban_test) list;
ban_cond_f *func;
int flags;
#define BAN_T_REGEXP (1 << 0)
#define BAN_T_NOT (1 << 1)
vre_t *re;
char *dst;
char *src;
};
struct ban {
unsigned magic;
#define BAN_MAGIC 0x700b08ea
VTAILQ_ENTRY(ban) list;
unsigned refcount;
int flags;
#define BAN_F_GONE (1 << 0)
#define BAN_F_PENDING (1 << 1)
#define BAN_F_REQ (1 << 2)
VTAILQ_HEAD(,ban_test) tests;
VTAILQ_HEAD(,objcore) objcore;
double t0;
struct vsb *vsb;
char *test;
};
static VTAILQ_HEAD(banhead_s,ban) ban_head = VTAILQ_HEAD_INITIALIZER(ban_head);
static struct lock ban_mtx;
......
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-2009 Linpro AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
struct ban_test;
/* A ban-testing function */
typedef int ban_cond_f(const struct ban_test *bt, const struct object *o,
const struct sess *sp);
/* Each individual test to be performed on a ban */
struct ban_test {
unsigned magic;
#define BAN_TEST_MAGIC 0x54feec67
VTAILQ_ENTRY(ban_test) list;
ban_cond_f *func;
int flags;
#define BAN_T_REGEXP (1 << 0)
#define BAN_T_NOT (1 << 1)
vre_t *re;
char *dst;
char *src;
};
struct ban {
unsigned magic;
#define BAN_MAGIC 0x700b08ea
VTAILQ_ENTRY(ban) list;
unsigned refcount;
int flags;
#define BAN_F_GONE (1 << 0)
#define BAN_F_PENDING (1 << 1)
#define BAN_F_REQ (1 << 2)
VTAILQ_HEAD(,ban_test) tests;
VTAILQ_HEAD(,objcore) objcore;
double t0;
struct vsb *vsb;
char *test;
};
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