Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
9b5ea6a2
Commit
9b5ea6a2
authored
Jan 07, 2007
by
Pierangelo Masarati
Browse files
honor network timeout even when doing full async
parent
aa3c9bad
Changes
3
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/ldap-int.h
View file @
9b5ea6a2
...
...
@@ -243,6 +243,7 @@ typedef struct ldap_conn {
void
*
lconn_sasl_sockctx
;
/* for security layer */
#endif
int
lconn_refcnt
;
time_t
lconn_created
;
/* time */
time_t
lconn_lastused
;
/* time */
int
lconn_rebind_inprogress
;
/* set if rebind in progress */
char
***
lconn_rebind_queue
;
/* used if rebind in progress */
...
...
libraries/libldap/open.c
View file @
9b5ea6a2
...
...
@@ -345,6 +345,8 @@ ldap_int_open_connection(
break
;
}
conn
->
lconn_created
=
time
(
NULL
);
#ifdef LDAP_DEBUG
ber_sockbuf_add_io
(
conn
->
lconn_sb
,
&
ber_sockbuf_io_debug
,
INT_MAX
,
(
void
*
)
"ldap_"
);
...
...
libraries/libldap/request.c
View file @
9b5ea6a2
...
...
@@ -223,10 +223,18 @@ ldap_send_server_request(
lc
->
lconn_status
=
LDAP_CONNST_CONNECTED
;
break
;
case
-
2
:
/* caller will have to call again */
ld
->
ld_errno
=
LDAP_X_CONNECTING
;
/* fallthru */
case
-
2
:
{
/* async only occurs if a network timeout is set */
struct
timeval
*
tvp
=
ld
->
ld_options
.
ldo_tm_net
;
assert
(
tvp
!=
NULL
);
/* honor network timeout */
if
(
time
(
NULL
)
-
lc
->
lconn_created
<=
tvp
->
tv_sec
)
{
/* caller will have to call again */
ld
->
ld_errno
=
LDAP_X_CONNECTING
;
}
}
/* fallthru */
default:
/* error */
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment