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
3a02001b
Commit
3a02001b
authored
Nov 22, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the pass variable a local static of the function which needs it.
parent
53bdce4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
cache_ban.c
bin/varnishd/cache/cache_ban.c
+7
-7
No files found.
bin/varnishd/cache/cache_ban.c
View file @
3a02001b
...
...
@@ -844,12 +844,13 @@ ban_CheckLast(void)
*/
static
int
ban_lurker_work
(
struct
worker
*
wrk
,
struct
vsl_log
*
vsl
,
unsigned
pass
)
ban_lurker_work
(
struct
worker
*
wrk
,
struct
vsl_log
*
vsl
)
{
struct
ban
*
b
,
*
b0
,
*
b2
;
struct
objhead
*
oh
;
struct
objcore
*
oc
,
*
oc2
;
struct
object
*
o
;
static
unsigned
pass
=
1
<<
LURK_SHIFT
;
int
i
;
AN
(
pass
&
BAN_F_LURK
);
...
...
@@ -984,6 +985,10 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
if
(
b
==
b0
)
break
;
}
pass
+=
(
1
<<
LURK_SHIFT
);
pass
&=
BAN_F_LURK
;
if
(
pass
==
0
)
pass
+=
(
1
<<
LURK_SHIFT
);
return
(
1
);
}
...
...
@@ -991,7 +996,6 @@ static void * __match_proto__(bgthread_t)
ban_lurker
(
struct
worker
*
wrk
,
void
*
priv
)
{
struct
ban
*
bf
;
unsigned
pass
=
(
1
<<
LURK_SHIFT
);
struct
vsl_log
vsl
;
int
i
=
0
;
...
...
@@ -1018,14 +1022,10 @@ ban_lurker(struct worker *wrk, void *priv)
VTIM_sleep
(
1
.
0
);
}
i
=
ban_lurker_work
(
wrk
,
&
vsl
,
pass
);
i
=
ban_lurker_work
(
wrk
,
&
vsl
);
VSL_Flush
(
&
vsl
,
0
);
WRK_SumStat
(
wrk
);
if
(
i
)
{
pass
+=
(
1
<<
LURK_SHIFT
);
pass
&=
BAN_F_LURK
;
if
(
pass
==
0
)
pass
+=
(
1
<<
LURK_SHIFT
);
VTIM_sleep
(
cache_param
->
ban_lurker_sleep
);
}
else
{
VTIM_sleep
(
1
.
0
);
...
...
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