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
0ca0a16b
Commit
0ca0a16b
authored
Jan 27, 2020
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the same pattern we do for other families of variables.
parent
cb023d70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+10
-11
No files found.
bin/varnishd/cache/cache_vrt_var.c
View file @
0ca0a16b
...
...
@@ -950,19 +950,18 @@ HTTP_VAR(beresp)
/*--------------------------------------------------------------------*/
#define set_noop(sp, d) (void)0
#ifdef SO_SNDTIMEO_WORKS
static
inline
void
set_idle_send_timeout
(
struct
sess
*
sp
,
VCL_DURATION
d
)
set_idle_send_timeout
(
const
struct
sess
*
sp
,
VCL_DURATION
d
)
{
#ifdef SO_SNDTIMEO_WORKS
struct
timeval
tv
=
VTIM_timeval
(
d
);
VTCP_Assert
(
setsockopt
(
sp
->
fd
,
SOL_SOCKET
,
SO_SNDTIMEO
,
&
tv
,
sizeof
tv
));
}
#else
#define set_idle_send_timeout(sp, d) set_noop(sp, d)
(
void
)
sp
;
(
void
)
d
;
#endif
}
#define SESS_VAR_DUR(x, setter) \
VCL_VOID \
...
...
@@ -972,7 +971,7 @@ VRT_l_sess_##x(VRT_CTX, VCL_DURATION d) \
CHECK_OBJ_NOTNULL(ctx->sp, SESS_MAGIC); \
if (d < 0.0) \
d = 0.0; \
setter
(ctx->sp, d);
\
setter
;
\
ctx->sp->x = d; \
} \
\
...
...
@@ -984,7 +983,7 @@ VRT_r_sess_##x(VRT_CTX) \
return (SESS_TMO(ctx->sp, x)); \
}
SESS_VAR_DUR
(
timeout_idle
,
set_noop
)
SESS_VAR_DUR
(
timeout_linger
,
set_noop
)
SESS_VAR_DUR
(
send_timeout
,
set_noop
)
SESS_VAR_DUR
(
idle_send_timeout
,
set_idle_send_timeout
)
SESS_VAR_DUR
(
timeout_idle
,
)
SESS_VAR_DUR
(
timeout_linger
,
)
SESS_VAR_DUR
(
send_timeout
,
)
SESS_VAR_DUR
(
idle_send_timeout
,
set_idle_send_timeout
(
ctx
->
sp
,
d
)
)
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