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
Christopher Ng
OpenLDAP
Commits
ebfb0b82
Commit
ebfb0b82
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Move presence index change outside of values for loop.
parent
4035b052
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-ldbm/index.c
+14
-27
14 additions, 27 deletions
servers/slapd/back-ldbm/index.c
with
14 additions
and
27 deletions
servers/slapd/back-ldbm/index.c
+
14
−
27
View file @
ebfb0b82
...
...
@@ -260,19 +260,14 @@ index_change_values(
if
(
op
==
SLAP_INDEX_ADD_OP
)
{
/* Add values */
idl_funct
=
idl_insert_key
;
mode
=
LDBM_WRCREAT
;
}
else
{
/* Delete values */
idl_funct
=
idl_delete_key
;
mode
=
LDBM_WRITER
;
}
#ifndef SLAPD_SCHEMA_NOT_COMPAT
...
...
@@ -307,31 +302,25 @@ index_change_values(
return
(
-
1
);
}
#ifdef SLAPD_SCHEMA_NOT_COMPAT
/* not yet implemented */
#else
for
(
i
=
0
;
vals
[
i
]
!=
NULL
;
i
++
)
{
/*
* presence index entry
*/
if
(
indexmask
&
SLAP_INDEX_PRESENCE
)
{
change_value
(
be
,
db
,
at_cn
,
SLAP_INDEX_PRESENCE
,
"*"
,
id
,
idl_funct
);
/*
* presence index entry
*/
if
(
indexmask
&
SLAP_INDEX_PRESENCE
)
{
change_value
(
be
,
db
,
at_cn
,
SLAP_INDEX_PRESENCE
,
"*"
,
id
,
idl_funct
);
}
}
if
(
syntax
&
SYNTAX_BIN
)
{
goto
done
;
}
for
(
i
=
0
;
vals
[
i
]
!=
NULL
;
i
++
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"index_change_values syntax 0x%x syntax bin 0x%x
\n
"
,
syntax
,
SYNTAX_BIN
,
0
);
if
(
syntax
&
SYNTAX_BIN
)
{
ldbm_cache_close
(
be
,
db
);
return
(
0
);
}
"index_change_values syntax 0x%x
\n
"
,
syntax
,
0
,
0
);
bigbuf
=
NULL
;
len
=
vals
[
i
]
->
bv_len
;
...
...
@@ -355,10 +344,8 @@ index_change_values(
* equality index entry
*/
if
(
indexmask
&
SLAP_INDEX_EQUALITY
)
{
change_value
(
be
,
db
,
at_cn
,
SLAP_INDEX_EQUALITY
,
val
,
id
,
idl_funct
);
}
/*
...
...
@@ -424,8 +411,8 @@ index_change_values(
}
#endif
done:
ldbm_cache_close
(
be
,
db
);
return
(
0
);
}
...
...
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