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
72648a74
Commit
72648a74
authored
Oct 26, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide struct vfp_ctx properly in cache_filter.h
parent
62c5b886
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
22 deletions
+35
-22
cache.h
bin/varnishd/cache/cache.h
+2
-21
cache_busyobj.c
bin/varnishd/cache/cache_busyobj.c
+6
-1
cache_esi_parse.c
bin/varnishd/cache/cache_esi_parse.c
+1
-0
cache_filter.h
bin/varnishd/cache/cache_filter.h
+19
-0
cache_req.c
bin/varnishd/cache/cache_req.c
+6
-0
cache_http1_fetch.c
bin/varnishd/http1/cache_http1_fetch.c
+1
-0
No files found.
bin/varnishd/cache/cache.h
View file @
72648a74
...
...
@@ -166,25 +166,6 @@ struct http {
uint8_t
conds
;
/* If-* headers present */
};
/*--------------------------------------------------------------------
* VFP filter state
*/
VTAILQ_HEAD
(
vfp_entry_s
,
vfp_entry
);
struct
vfp_ctx
{
unsigned
magic
;
#define VFP_CTX_MAGIC 0x61d9d3e5
int
failed
;
struct
http
*
req
;
struct
http
*
resp
;
struct
worker
*
wrk
;
struct
objcore
*
oc
;
struct
vfp_entry_s
vfp
;
struct
vfp_entry
*
vfp_nxt
;
};
/*--------------------------------------------------------------------
* HTTP Protocol connection structure
*
...
...
@@ -437,7 +418,7 @@ struct busyobj {
struct
sess
*
sp
;
struct
worker
*
wrk
;
struct
vfp_ctx
vfc
[
1
]
;
struct
vfp_ctx
*
vfc
;
struct
ws
ws
[
1
];
uintptr_t
ws_bo
;
...
...
@@ -538,7 +519,7 @@ struct req {
double
t_req
;
/* Headers complete */
struct
http_conn
htc
[
1
];
struct
vfp_ctx
vfc
[
1
]
;
struct
vfp_ctx
*
vfc
;
const
char
*
client_identity
;
/* HTTP request */
...
...
bin/varnishd/cache/cache_busyobj.c
View file @
72648a74
...
...
@@ -35,7 +35,7 @@
#include <stdlib.h>
#include "cache_varnishd.h"
#include "cache_filter.h"
#include "cache_objhead.h"
static
struct
mempool
*
vbopool
;
...
...
@@ -121,6 +121,11 @@ VBO_GetBusyObj(struct worker *wrk, const struct req *req)
p
=
(
void
*
)
PRNDUP
(
p
);
assert
(
p
<
bo
->
end
);
bo
->
vfc
=
(
void
*
)
p
;
p
+=
sizeof
(
*
bo
->
vfc
);
p
=
(
void
*
)
PRNDUP
(
p
);
INIT_OBJ
(
bo
->
vfc
,
VFP_CTX_MAGIC
);
WS_Init
(
bo
->
ws
,
"bo"
,
p
,
bo
->
end
-
p
);
bo
->
do_stream
=
1
;
...
...
bin/varnishd/cache/cache_esi_parse.c
View file @
72648a74
...
...
@@ -31,6 +31,7 @@
#include "config.h"
#include "cache_varnishd.h"
#include "cache_filter.h"
#include "cache_vgz.h"
#include "cache_esi.h"
...
...
bin/varnishd/cache/cache_filter.h
View file @
72648a74
...
...
@@ -65,6 +65,25 @@ struct vfp_entry {
uint64_t
bytes_out
;
};
/*--------------------------------------------------------------------
* VFP filter state
*/
VTAILQ_HEAD
(
vfp_entry_s
,
vfp_entry
);
struct
vfp_ctx
{
unsigned
magic
;
#define VFP_CTX_MAGIC 0x61d9d3e5
int
failed
;
struct
http
*
req
;
struct
http
*
resp
;
struct
worker
*
wrk
;
struct
objcore
*
oc
;
struct
vfp_entry_s
vfp
;
struct
vfp_entry
*
vfp_nxt
;
};
enum
vfp_status
VFP_Suck
(
struct
vfp_ctx
*
,
void
*
p
,
ssize_t
*
lp
);
enum
vfp_status
VFP_Error
(
struct
vfp_ctx
*
,
const
char
*
fmt
,
...)
__v_printflike
(
2
,
3
);
...
...
bin/varnishd/cache/cache_req.c
View file @
72648a74
...
...
@@ -33,6 +33,7 @@
#include "config.h"
#include "cache_varnishd.h"
#include "cache_filter.h"
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -122,6 +123,10 @@ Req_New(const struct worker *wrk, struct sess *sp)
p
+=
sz
;
p
=
(
void
*
)
PRNDUP
(
p
);
req
->
vfc
=
(
void
*
)
p
;
p
+=
sizeof
(
*
req
->
vfc
);
INIT_OBJ
(
req
->
vfc
,
VFP_CTX_MAGIC
);
assert
(
p
<
e
);
WS_Init
(
req
->
ws
,
"req"
,
p
,
e
-
p
);
...
...
@@ -136,6 +141,7 @@ Req_New(const struct worker *wrk, struct sess *sp)
VTAILQ_INIT
(
&
req
->
vdpe
);
VRTPRIV_init
(
req
->
privs
);
return
(
req
);
}
...
...
bin/varnishd/http1/cache_http1_fetch.c
View file @
72648a74
...
...
@@ -30,6 +30,7 @@
#include "config.h"
#include "cache/cache_varnishd.h"
#include "cache/cache_filter.h"
#include <errno.h>
#include <stdio.h>
...
...
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