Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent3
Commits
cd458db6
Commit
cd458db6
authored
Mar 08, 2011
by
Tollef Fog Heen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tighten SO{RCV,SND}TIMEO check
We can check the size of the return value too.
parent
ab70df53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
configure.ac
configure.ac
+2
-2
No files found.
configure.ac
View file @
cd458db6
...
@@ -354,7 +354,7 @@ struct timeval tv = { 1, 0 };
...
@@ -354,7 +354,7 @@ struct timeval tv = { 1, 0 };
if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv) == 0) {
if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv) == 0) {
socklen_t l = sizeof tv;
socklen_t l = sizeof tv;
if (getsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, &l) == 0) {
if (getsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, &l) == 0) {
return
0
;
return
(l != sizeof tv)
;
}
}
}
}
return 1;
return 1;
...
@@ -379,7 +379,7 @@ struct timeval tv = { 1, 0 };
...
@@ -379,7 +379,7 @@ struct timeval tv = { 1, 0 };
if (setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof tv) == 0) {
if (setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof tv) == 0) {
socklen_t l = sizeof tv;
socklen_t l = sizeof tv;
if (getsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, &tv, &l) == 0) {
if (getsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, &tv, &l) == 0) {
return
0
;
return
(l != sizeof tv)
;
}
}
}
}
return 1;
return 1;
...
...
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