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
bfbd2963
Commit
bfbd2963
authored
Apr 24, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change debug.sndbuf to only handle int buffer lengths
should also fix printf format errors on 32bit
parent
21da8c35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
vmod_debug.c
lib/libvmod_debug/vmod_debug.c
+10
-3
No files found.
lib/libvmod_debug/vmod_debug.c
View file @
bfbd2963
...
...
@@ -809,9 +809,9 @@ xyzzy_release_vcl_busy(VRT_CTX)
}
VCL_VOID
xyzzy_sndbuf
(
VRT_CTX
,
VCL_BYTES
buflen
)
xyzzy_sndbuf
(
VRT_CTX
,
VCL_BYTES
arg
)
{
int
fd
=
-
1
,
oldbuf
,
newbuf
;
int
fd
=
-
1
,
oldbuf
,
newbuf
,
buflen
;
socklen_t
intlen
=
sizeof
(
int
);
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -832,6 +832,13 @@ xyzzy_sndbuf(VRT_CTX, VCL_BYTES buflen)
xxxassert
(
fd
>=
0
);
if
(
arg
>
INT_MAX
)
buflen
=
INT_MAX
;
else
if
(
arg
<=
0
)
buflen
=
0
;
else
buflen
=
(
int
)
arg
;
oldbuf
=
0
;
AZ
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_SNDBUF
,
&
oldbuf
,
&
intlen
));
...
...
@@ -840,6 +847,6 @@ xyzzy_sndbuf(VRT_CTX, VCL_BYTES buflen)
AZ
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_SNDBUF
,
&
newbuf
,
&
intlen
));
AN
(
ctx
->
vsl
);
VSLb
(
ctx
->
vsl
,
SLT_Debug
,
"SO_SNDBUF fd=%d old=%d new=%
l
d actual=%d"
,
VSLb
(
ctx
->
vsl
,
SLT_Debug
,
"SO_SNDBUF fd=%d old=%d new=%d actual=%d"
,
fd
,
oldbuf
,
buflen
,
newbuf
);
}
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