Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Joe Martin
OpenLDAP
Commits
d147e609
Commit
d147e609
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Implement TCP_NODELAY on both client and server side.
parent
f0c1fc37
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/ac/socket.h
+1
-0
1 addition, 0 deletions
include/ac/socket.h
libraries/libldap/os-ip.c
+12
-0
12 additions, 0 deletions
libraries/libldap/os-ip.c
servers/slapd/daemon.c
+15
-2
15 additions, 2 deletions
servers/slapd/daemon.c
with
28 additions
and
2 deletions
include/ac/socket.h
+
1
−
0
View file @
d147e609
...
...
@@ -26,6 +26,7 @@
#endif
#include
<netinet/in.h>
#include
<netinet/tcp.h>
#ifdef HAVE_ARPA_INET_H
#include
<arpa/inet.h>
...
...
This diff is collapsed.
Click to expand it.
libraries/libldap/os-ip.c
+
12
−
0
View file @
d147e609
...
...
@@ -91,6 +91,18 @@ ldap_connect_to_host( Sockbuf *sb, const char *host, unsigned long address,
if
((
s
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
DO_RETURN
(
-
1
);
}
#ifdef TCP_NODELAY
{
int
tmp
=
1
;
if
(
setsockopt
(
s
,
IPPROTO_TCP
,
TCP_NODELAY
,
&
tmp
,
sizeof
(
tmp
)
)
==
-
1
)
{
Debug
(
LDAP_DEBUG_ANY
,
"setsockopt(TCP_NODELAY failed on %d
\n
"
,
s
,
0
,
0
);
}
}
#endif
#ifdef notyet
status
=
1
;
if
(
async
&&
ioctl
(
s
,
FIONBIO
,
(
caddr_t
)
&
status
)
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/daemon.c
+
15
−
2
View file @
d147e609
...
...
@@ -312,7 +312,7 @@ open_listener(
{
int
err
=
errno
;
Debug
(
LDAP_DEBUG_ANY
,
"slapd(%ld): setsockopt() failed errno %d (%s)
\n
"
,
"slapd(%ld): setsockopt(
SO_REUSEADDR
) failed errno %d (%s)
\n
"
,
(
long
)
l
.
sl_sd
,
err
,
err
>
-
1
&&
err
<
sys_nerr
?
sys_errlist
[
err
]
:
"unknown"
);
...
...
@@ -325,7 +325,20 @@ open_listener(
{
int
err
=
errno
;
Debug
(
LDAP_DEBUG_ANY
,
"slapd(%ld): setsockopt(KEEPALIVE) failed errno %d (%s)
\n
"
,
"slapd(%ld): setsockopt(SO_KEEPALIVE) failed errno %d (%s)
\n
"
,
(
long
)
l
.
sl_sd
,
err
,
err
>
-
1
&&
err
<
sys_nerr
?
sys_errlist
[
err
]
:
"unknown"
);
}
#endif
#ifdef TCP_NODELAY
tmp
=
1
;
if
(
setsockopt
(
l
.
sl_sd
,
IPPROTO_TCP
,
TCP_NODELAY
,
(
char
*
)
&
tmp
,
sizeof
(
tmp
)
)
)
{
int
err
=
errno
;
Debug
(
LDAP_DEBUG_ANY
,
"slapd(%ld): setsockopt(TCP_NODELAY) failed errno %d (%s)
\n
"
,
(
long
)
l
.
sl_sd
,
err
,
err
>
-
1
&&
err
<
sys_nerr
?
sys_errlist
[
err
]
:
"unknown"
);
...
...
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