Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
01ff17c0
Commit
01ff17c0
authored
Oct 21, 2006
by
Kurt Zeilenga
Browse files
ITS#2708 keepalive patch
parent
0d747e01
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
01ff17c0
...
...
@@ -2,6 +2,7 @@ OpenLDAP 2.3 Change Log
OpenLDAP 2.3.28 Release
Fixed libldap ldap.conf max line length (ITS#4669)
Fixed libldap use keepalive for syncrepl (ITS#4708)
Fixed liblutil LDIF CR/LF parsing bug (ITS#4635)
Fixed librewrite LDAP map parsing bug
Fixed librewrite map double free bug
...
...
libraries/libldap/os-ip.c
View file @
01ff17c0
...
...
@@ -123,20 +123,31 @@ ldap_pvt_close_socket(LDAP *ld, int s)
static
int
ldap_int_prepare_socket
(
LDAP
*
ld
,
int
s
,
int
proto
)
{
osip_debug
(
ld
,
"ldap_prepare_socket: %d
\n
"
,
s
,
0
,
0
);
osip_debug
(
ld
,
"ldap_prepare_socket: %d
\n
"
,
s
,
0
,
0
);
#ifdef TCP_NODELAY
if
(
proto
==
LDAP_PROTO_TCP
)
{
#if
def
ined( SO_KEEPALIVE ) || defined(
TCP_NODELAY
)
if
(
proto
==
LDAP_PROTO_TCP
)
{
int
dummy
=
1
;
#ifdef SO_KEEPALIVE
if
(
setsockopt
(
s
,
SOL_SOCKET
,
SO_KEEPALIVE
,
(
char
*
)
&
dummy
,
sizeof
(
dummy
)
)
==
AC_SOCKET_ERROR
)
{
osip_debug
(
ld
,
"ldap_prepare_socket: "
"setsockopt(%d, SO_KEEPALIVE) failed (ignored).
\n
"
,
s
,
0
,
0
);
}
#endif
/* SO_KEEPALIVE */
#ifdef TCP_NODELAY
if
(
setsockopt
(
s
,
IPPROTO_TCP
,
TCP_NODELAY
,
(
char
*
)
&
dummy
,
sizeof
(
dummy
)
)
==
AC_SOCKET_ERROR
)
{
osip_debug
(
ld
,
"ldap_prepare_socket: "
osip_debug
(
ld
,
"ldap_prepare_socket: "
"setsockopt(%d, TCP_NODELAY) failed (ignored).
\n
"
,
s
,
0
,
0
);
s
,
0
,
0
);
}
#endif
/* TCP_NODELAY */
}
#endif
#endif
/* SO_KEEPALIVE || TCP_NODELAY */
return
0
;
}
...
...
Write
Preview
Supports
Markdown
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