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
David Barchiesi
OpenLDAP
Commits
9b5ea6a2
Commit
9b5ea6a2
authored
18 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
honor network timeout even when doing full async
parent
aa3c9bad
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
libraries/libldap/ldap-int.h
+1
-0
1 addition, 0 deletions
libraries/libldap/ldap-int.h
libraries/libldap/open.c
+2
-0
2 additions, 0 deletions
libraries/libldap/open.c
libraries/libldap/request.c
+12
-4
12 additions, 4 deletions
libraries/libldap/request.c
with
15 additions
and
4 deletions
libraries/libldap/ldap-int.h
+
1
−
0
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 */
...
...
This diff is collapsed.
Click to expand it.
libraries/libldap/open.c
+
2
−
0
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_"
);
...
...
This diff is collapsed.
Click to expand it.
libraries/libldap/request.c
+
12
−
4
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 */
...
...
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