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
6d468fe2
Commit
6d468fe2
authored
Mar 31, 2014
by
Martin Blix Grydeland
Committed by
Martin Blix Grydeland
Mar 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use acct as variable name
This triggers 'shadows global' build errors.
parent
d6d97bb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
cache_pipe.c
bin/varnishd/cache/cache_pipe.c
+14
-12
No files found.
bin/varnishd/cache/cache_pipe.c
View file @
6d468fe2
...
...
@@ -98,7 +98,7 @@ PipeRequest(struct req *req, struct busyobj *bo)
struct
worker
*
wrk
;
struct
pollfd
fds
[
2
];
int
i
;
struct
acct_pipe
acct
;
struct
acct_pipe
acct
_pipe
;
ssize_t
hdrbytes
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
...
...
@@ -109,13 +109,13 @@ PipeRequest(struct req *req, struct busyobj *bo)
req
->
res_mode
=
RES_PIPE
;
memset
(
&
acct
,
0
,
sizeof
acct
);
acct
.
req
=
req
->
acct
.
req_hdrbytes
;
memset
(
&
acct
_pipe
,
0
,
sizeof
acct_pipe
);
acct
_pipe
.
req
=
req
->
acct
.
req_hdrbytes
;
req
->
acct
.
req_hdrbytes
=
0
;
vc
=
VDI_GetFd
(
bo
);
if
(
vc
==
NULL
)
{
pipecharge
(
req
,
&
acct
,
NULL
);
pipecharge
(
req
,
&
acct
_pipe
,
NULL
);
SES_Close
(
req
->
sp
,
SC_OVERLOAD
);
return
;
}
...
...
@@ -129,16 +129,16 @@ PipeRequest(struct req *req, struct busyobj *bo)
(
void
)
WRW_Write
(
wrk
,
req
->
htc
->
pipeline
.
b
,
Tlen
(
req
->
htc
->
pipeline
));
i
=
WRW_FlushRelease
(
wrk
,
&
acct
.
bereq
);
if
(
acct
.
bereq
>
hdrbytes
)
{
acct
.
in
=
acct
.
bereq
-
hdrbytes
;
acct
.
bereq
=
hdrbytes
;
i
=
WRW_FlushRelease
(
wrk
,
&
acct
_pipe
.
bereq
);
if
(
acct
_pipe
.
bereq
>
hdrbytes
)
{
acct
_pipe
.
in
=
acct_pipe
.
bereq
-
hdrbytes
;
acct
_pipe
.
bereq
=
hdrbytes
;
}
VSLb_ts_req
(
req
,
"Pipe"
,
W_TIM_real
(
wrk
));
if
(
i
)
{
pipecharge
(
req
,
&
acct
,
vc
->
backend
->
vsc
);
pipecharge
(
req
,
&
acct
_pipe
,
vc
->
backend
->
vsc
);
SES_Close
(
req
->
sp
,
SC_TX_PIPE
);
VDI_CloseFd
(
&
vc
,
NULL
);
return
;
...
...
@@ -160,7 +160,8 @@ PipeRequest(struct req *req, struct busyobj *bo)
i
=
poll
(
fds
,
2
,
(
int
)(
cache_param
->
pipe_timeout
*
1e3
));
if
(
i
<
1
)
break
;
if
(
fds
[
0
].
revents
&&
rdf
(
vc
->
fd
,
req
->
sp
->
fd
,
&
acct
.
out
))
{
if
(
fds
[
0
].
revents
&&
rdf
(
vc
->
fd
,
req
->
sp
->
fd
,
&
acct_pipe
.
out
))
{
if
(
fds
[
1
].
fd
==
-
1
)
break
;
(
void
)
shutdown
(
vc
->
fd
,
SHUT_RD
);
...
...
@@ -168,7 +169,8 @@ PipeRequest(struct req *req, struct busyobj *bo)
fds
[
0
].
events
=
0
;
fds
[
0
].
fd
=
-
1
;
}
if
(
fds
[
1
].
revents
&&
rdf
(
req
->
sp
->
fd
,
vc
->
fd
,
&
acct
.
in
))
{
if
(
fds
[
1
].
revents
&&
rdf
(
req
->
sp
->
fd
,
vc
->
fd
,
&
acct_pipe
.
in
))
{
if
(
fds
[
0
].
fd
==
-
1
)
break
;
(
void
)
shutdown
(
req
->
sp
->
fd
,
SHUT_RD
);
...
...
@@ -178,7 +180,7 @@ PipeRequest(struct req *req, struct busyobj *bo)
}
}
VSLb_ts_req
(
req
,
"PipeSess"
,
W_TIM_real
(
wrk
));
pipecharge
(
req
,
&
acct
,
vc
->
backend
->
vsc
);
pipecharge
(
req
,
&
acct
_pipe
,
vc
->
backend
->
vsc
);
SES_Close
(
req
->
sp
,
SC_TX_PIPE
);
VDI_CloseFd
(
&
vc
,
NULL
);
bo
->
vbc
=
NULL
;
...
...
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