Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1bf7f620
Commit
1bf7f620
authored
May 14, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate the cache_ban.h header file, it's contents is entirely
private to cache_ban.c, so inline it there.
parent
1e10378a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
67 deletions
+35
-67
Makefile.am
bin/varnishd/Makefile.am
+0
-1
cache_ban.c
bin/varnishd/cache_ban.c
+35
-1
cache_ban.h
bin/varnishd/cache_ban.h
+0
-65
No files found.
bin/varnishd/Makefile.am
View file @
1bf7f620
...
...
@@ -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
\
...
...
bin/varnishd/cache_ban.c
View file @
1bf7f620
...
...
@@ -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
;
...
...
bin/varnishd/cache_ban.h
deleted
100644 → 0
View file @
1e10378a
/*-
* 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
;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment