Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
60b02986
Commit
60b02986
authored
19 years ago
by
Gisle Vanem
Browse files
Options
Downloads
Patches
Plain Diff
Use getprotobyname() to retrieve protocol number for TCP
(sorry, I don't know how to add this to the configure process).
parent
f592ea6c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/config-win32.h
+3
-0
3 additions, 0 deletions
lib/config-win32.h
lib/config.dj
+1
-0
1 addition, 0 deletions
lib/config.dj
lib/connect.c
+9
-1
9 additions, 1 deletion
lib/connect.c
with
13 additions
and
1 deletion
lib/config-win32.h
+
3
−
0
View file @
60b02986
...
...
@@ -136,6 +136,9 @@
/* Define if you have the getservbyname function. */
#define HAVE_GETSERVBYNAME 1
/* Define if you have the getprotobyname function. */
#define HAVE_GETPROTOBYNAME
/* Define if you have the gettimeofday function. */
/* #define HAVE_GETTIMEOFDAY 1 */
...
...
This diff is collapsed.
Click to expand it.
lib/config.dj
+
1
−
0
View file @
60b02986
...
...
@@ -20,6 +20,7 @@
#define HAVE_GETHOSTNAME 1
#define HAVE_GETPASS 1
#define HAVE_GETSERVBYNAME 1
#define HAVE_GETPROTOBYNAME 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_INET_ADDR 1
#define HAVE_INET_NTOA 1
...
...
This diff is collapsed.
Click to expand it.
lib/connect.c
+
9
−
1
View file @
60b02986
...
...
@@ -619,7 +619,15 @@ static void tcpnodelay(struct connectdata *conn,
#ifdef TCP_NODELAY
struct
SessionHandle
*
data
=
conn
->
data
;
socklen_t
onoff
=
(
socklen_t
)
data
->
set
.
tcp_nodelay
;
if
(
setsockopt
(
sockfd
,
IPPROTO_TCP
,
TCP_NODELAY
,
(
void
*
)
&
onoff
,
int
proto
=
IPPROTO_TCP
;
#ifdef HAVE_GETPROTOBYNAME
struct
protoent
*
pe
=
getprotobyname
(
"tcp"
);
if
(
pe
)
proto
=
p
->
p_proto
;
#endif
if
(
setsockopt
(
sockfd
,
proto
,
TCP_NODELAY
,
(
void
*
)
&
onoff
,
sizeof
(
onoff
))
<
0
)
infof
(
data
,
"Could not set TCP_NODELAY: %s
\n
"
,
Curl_strerror
(
conn
,
Curl_ourerrno
()));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment