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
HAMANO Tsukasa
OpenLDAP
Commits
470559ac
Commit
470559ac
authored
Sep 02, 2021
by
HAMANO Tsukasa
Browse files
ITS#9631 back-wt: closing cache db politely
parent
73be971a
Pipeline
#3404
passed with stage
in 51 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-wt/init.c
View file @
470559ac
...
...
@@ -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_conn
->
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
;
}
...
...
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