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
85bc1101
Commit
85bc1101
authored
Mar 05, 2009
by
Quanah Gibson-Mount
Browse files
Fix prev commit
parent
7c07bd35
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/cache.c
View file @
85bc1101
...
...
@@ -831,7 +831,7 @@ bdb_cache_find_id(
{
struct
bdb_info
*
bdb
=
(
struct
bdb_info
*
)
op
->
o_bd
->
be_private
;
Entry
*
ep
=
NULL
;
int
rc
=
0
,
load
=
0
;
int
rc
=
0
,
load
=
0
,
added
=
0
;
EntryInfo
ei
=
{
0
};
ei
.
bei_id
=
id
;
...
...
@@ -927,7 +927,10 @@ load1:
* loading it, i.e it is already cached or
* another thread is currently loading it.
*/
(
*
eip
)
->
bei_state
&=
~
CACHE_ENTRY_NOT_CACHED
;
if
(
(
*
eip
)
->
bei_state
&
CACHE_ENTRY_NOT_CACHED
)
{
(
*
eip
)
->
bei_state
&=
~
CACHE_ENTRY_NOT_CACHED
;
added
=
1
;
}
flag
&=
~
ID_NOCACHE
;
}
...
...
@@ -955,6 +958,7 @@ load1:
#endif
ep
=
NULL
;
bdb_cache_lru_link
(
bdb
,
*
eip
);
added
=
1
;
if
((
flag
&
ID_NOCACHE
)
&&
(
bdb_cache_entryinfo_trylock
(
*
eip
)
==
0
))
{
/* Set the cached state only if no other thread
...
...
@@ -1019,7 +1023,7 @@ load1:
if
(
rc
==
0
)
{
int
purge
=
0
;
if
(
loa
d
)
{
if
(
adde
d
)
{
ldap_pvt_thread_mutex_lock
(
&
bdb
->
bi_cache
.
c_count_mutex
);
if
(
!
(
flag
&
ID_NOCACHE
))
{
bdb
->
bi_cache
.
c_cursize
++
;
...
...
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