Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
c1dac642
Commit
c1dac642
authored
Nov 29, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move vef_priv from worker to busyobj
parent
4faa1784
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_esi_fetch.c
bin/varnishd/cache/cache_esi_fetch.c
+15
-11
No files found.
bin/varnishd/cache/cache.h
View file @
c1dac642
...
...
@@ -332,7 +332,6 @@ struct worker {
struct
http
*
beresp
;
struct
vbc
*
vbc
;
struct
vef_priv
*
vef_priv
;
unsigned
do_stream
;
unsigned
do_esi
;
unsigned
do_gzip
;
...
...
@@ -507,6 +506,7 @@ struct busyobj {
struct
http_conn
htc
;
enum
body_status
body_status
;
struct
vef_priv
*
vef_priv
;
};
/* Object structure --------------------------------------------------*/
...
...
bin/varnishd/cache/cache_esi_fetch.c
View file @
c1dac642
...
...
@@ -150,7 +150,8 @@ vfp_vep_callback(struct worker *w, ssize_t l, enum vgz_flag flg)
int
i
;
CHECK_OBJ_NOTNULL
(
w
,
WORKER_MAGIC
);
vef
=
w
->
vef_priv
;
CHECK_OBJ_NOTNULL
(
w
->
busyobj
,
BUSYOBJ_MAGIC
);
vef
=
w
->
busyobj
->
vef_priv
;
CHECK_OBJ_NOTNULL
(
vef
,
VEF_MAGIC
);
assert
(
l
>=
0
);
...
...
@@ -211,7 +212,8 @@ vfp_esi_bytes_ug(struct worker *w, struct http_conn *htc, ssize_t bytes)
struct
vef_priv
*
vef
;
CHECK_OBJ_NOTNULL
(
w
,
WORKER_MAGIC
);
vef
=
w
->
vef_priv
;
CHECK_OBJ_NOTNULL
(
w
->
busyobj
,
BUSYOBJ_MAGIC
);
vef
=
w
->
busyobj
->
vef_priv
;
CHECK_OBJ_NOTNULL
(
vef
,
VEF_MAGIC
);
while
(
bytes
>
0
)
{
...
...
@@ -252,7 +254,8 @@ vfp_esi_bytes_gg(struct worker *w, struct http_conn *htc, size_t bytes)
int
i
;
CHECK_OBJ_NOTNULL
(
w
,
WORKER_MAGIC
);
vef
=
w
->
vef_priv
;
CHECK_OBJ_NOTNULL
(
w
->
busyobj
,
BUSYOBJ_MAGIC
);
vef
=
w
->
busyobj
->
vef_priv
;
CHECK_OBJ_NOTNULL
(
vef
,
VEF_MAGIC
);
assert
(
sizeof
ibuf
>=
1024
);
ibuf2
[
0
]
=
0
;
/* For Flexelint */
...
...
@@ -308,19 +311,19 @@ vfp_esi_begin(struct worker *w, size_t estimate)
ALLOC_OBJ
(
vef
,
VEF_MAGIC
);
AN
(
vef
);
vef
->
vgz
=
VGZ_NewGzip
(
w
,
"G F E"
);
AZ
(
w
->
vef_priv
);
w
->
vef_priv
=
vef
;
AZ
(
w
->
busyobj
->
vef_priv
);
w
->
busyobj
->
vef_priv
=
vef
;
VEP_Init
(
w
,
vfp_vep_callback
);
}
else
if
(
w
->
busyobj
->
is_gzip
)
{
w
->
busyobj
->
vgz_rx
=
VGZ_NewUngzip
(
w
,
"U F E"
);
ALLOC_OBJ
(
vef
,
VEF_MAGIC
);
AN
(
vef
);
vef
->
vgz
=
VGZ_NewGzip
(
w
,
"G F E"
);
AZ
(
w
->
vef_priv
);
w
->
vef_priv
=
vef
;
AZ
(
w
->
busyobj
->
vef_priv
);
w
->
busyobj
->
vef_priv
=
vef
;
VEP_Init
(
w
,
vfp_vep_callback
);
}
else
{
AZ
(
w
->
vef_priv
);
AZ
(
w
->
busyobj
->
vef_priv
);
VEP_Init
(
w
,
NULL
);
}
...
...
@@ -358,6 +361,7 @@ vfp_esi_end(struct worker *w)
int
retval
;
CHECK_OBJ_NOTNULL
(
w
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
w
->
busyobj
,
BUSYOBJ_MAGIC
);
AN
(
w
->
busyobj
->
vep
);
retval
=
w
->
busyobj
->
fetch_failed
;
...
...
@@ -387,10 +391,10 @@ vfp_esi_end(struct worker *w)
VSB_delete
(
vsb
);
}
if
(
w
->
vef_priv
!=
NULL
)
{
vef
=
w
->
vef_priv
;
vef
=
w
->
busyobj
->
vef_priv
;
if
(
vef
!=
NULL
)
{
CHECK_OBJ_NOTNULL
(
vef
,
VEF_MAGIC
);
w
->
vef_priv
=
NULL
;
w
->
busyobj
->
vef_priv
=
NULL
;
VGZ_UpdateObj
(
vef
->
vgz
,
w
->
busyobj
->
fetch_obj
);
if
(
VGZ_Destroy
(
&
vef
->
vgz
,
-
1
)
!=
VGZ_END
)
retval
=
FetchError
(
w
,
...
...
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