Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Dimitar Stoychev
OpenLDAP
Commits
da0a060e
Commit
da0a060e
authored
3 years ago
by
HAMANO Tsukasa
Committed by
Quanah Gibson-Mount
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ITS#9631 back-wt: closing cache db politely
parent
d453a9b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-wt/init.c
+15
-10
15 additions, 10 deletions
servers/slapd/back-wt/init.c
with
15 additions
and
10 deletions
servers/slapd/back-wt/init.c
+
15
−
10
View file @
da0a060e
...
...
@@ -232,20 +232,25 @@ wt_db_close( BackendDB *be, ConfigReply *cr )
struct
wt_info
*
wi
=
(
struct
wt_info
*
)
be
->
be_private
;
int
rc
;
if
(
!
wi
->
wi_conn
)
{
return
-
1
;
if
(
wi
->
wi_cache
)
{
rc
=
wi
->
wi_cache
->
close
(
wi
->
wi_cache
,
NULL
);
if
(
rc
)
{
Debug
(
LDAP_DEBUG_ANY
,
"wt_db_close: cannot close cache database (%d).
\n
"
,
rc
);
return
-
1
;
}
}
rc
=
wi
->
wi_conn
->
close
(
wi
->
wi_conn
,
NULL
);
if
(
rc
)
{
int
saved_errno
=
errno
;
Debug
(
LDAP_DEBUG_ANY
,
"wt_db_close: cannot close database (%d).
\n
"
,
saved_errno
);
return
-
1
;
if
(
wi
->
wi_conn
)
{
rc
=
wi
->
wi_conn
->
close
(
wi
->
wi_conn
,
NULL
);
if
(
rc
)
{
Debug
(
LDAP_DEBUG_ANY
,
"wt_db_close: cannot close database (%d).
\n
"
,
rc
);
return
-
1
;
}
wi
->
wi_flags
&=
~
WT_IS_OPEN
;
}
wi
->
wi_flags
&=
~
WT_IS_OPEN
;
return
LDAP_SUCCESS
;
}
...
...
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