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
f9e413c7
Commit
f9e413c7
authored
Mar 05, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't assert if we fail to get storage in VFP_Begin()
Fixes #1100
parent
b399a62f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+13
-8
cache_panic.c
bin/varnishd/cache/cache_panic.c
+2
-1
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
f9e413c7
...
...
@@ -76,13 +76,16 @@ FetchError(struct busyobj *bo, const char *error)
* VFP method functions
*/
static
void
static
int
VFP_Begin
(
struct
busyobj
*
bo
,
size_t
estimate
)
{
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
AN
(
bo
->
vfp
);
bo
->
vfp
->
begin
(
bo
,
estimate
);
if
(
bo
->
fetch_failed
)
return
(
-
1
);
return
(
0
);
}
static
int
...
...
@@ -146,7 +149,6 @@ vfp_nop_bytes(struct busyobj *bo, struct http_conn *htc, ssize_t bytes)
ssize_t
l
,
wl
;
struct
storage
*
st
;
AZ
(
bo
->
fetch_failed
);
while
(
bytes
>
0
)
{
st
=
FetchStorage
(
bo
,
0
);
if
(
st
==
NULL
)
...
...
@@ -575,22 +577,25 @@ FetchBody(struct worker *wrk, struct busyobj *bo)
break
;
case
BS_LENGTH
:
cl
=
fetch_number
(
bo
->
h_content_length
,
10
);
VFP_Begin
(
bo
,
cl
>
0
?
cl
:
0
);
cls
=
fetch_straight
(
bo
,
htc
,
cl
);
cls
=
VFP_Begin
(
bo
,
cl
>
0
?
cl
:
0
);
if
(
!
cls
)
cls
=
fetch_straight
(
bo
,
htc
,
cl
);
mklen
=
1
;
if
(
VFP_End
(
bo
))
cls
=
-
1
;
break
;
case
BS_CHUNKED
:
VFP_Begin
(
bo
,
cl
);
cls
=
fetch_chunked
(
bo
,
htc
);
cls
=
VFP_Begin
(
bo
,
cl
);
if
(
!
cls
)
cls
=
fetch_chunked
(
bo
,
htc
);
mklen
=
1
;
if
(
VFP_End
(
bo
))
cls
=
-
1
;
break
;
case
BS_EOF
:
VFP_Begin
(
bo
,
cl
);
cls
=
fetch_eof
(
bo
,
htc
);
cls
=
VFP_Begin
(
bo
,
cl
);
if
(
!
cls
)
cls
=
fetch_eof
(
bo
,
htc
);
mklen
=
1
;
if
(
VFP_End
(
bo
))
cls
=
-
1
;
...
...
bin/varnishd/cache/cache_panic.c
View file @
f9e413c7
...
...
@@ -213,7 +213,8 @@ pan_busyobj(const struct busyobj *bo)
if
(
bo
->
do_esi
)
VSB_printf
(
pan_vsp
,
" do_esi
\n
"
);
if
(
bo
->
do_stream
)
VSB_printf
(
pan_vsp
,
" do_stream
\n
"
);
if
(
bo
->
should_close
)
VSB_printf
(
pan_vsp
,
" should_close
\n
"
);
VSB_printf
(
pan_vsp
,
" bodystatus = %d,
\n
"
,
bo
->
body_status
);
VSB_printf
(
pan_vsp
,
" bodystatus = %d (%s),
\n
"
,
bo
->
body_status
,
body_status
(
bo
->
body_status
));
VSB_printf
(
pan_vsp
,
" },
\n
"
);
if
(
VALID_OBJ
(
bo
->
vbc
,
BACKEND_MAGIC
))
pan_vbc
(
bo
->
vbc
);
...
...
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