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
openldap
OpenLDAP
Commits
aeaaa8c6
Commit
aeaaa8c6
authored
Jan 03, 2003
by
Hallvard Furuseth
Browse files
Fix octetStringOrderingMatch(). It thought "b"<"aa", becuase "b" is shorter.
parent
b0f9305b
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/schema_init.c
View file @
aeaaa8c6
...
...
@@ -59,7 +59,6 @@
#define caseIgnoreOrderingMatch caseIgnoreMatch
#define caseExactOrderingMatch caseExactMatch
#define integerOrderingMatch integerMatch
#define octetStringOrderingMatch octetStringMatch
/* unimplemented matching routines */
#define caseIgnoreListMatch NULL
...
...
@@ -138,6 +137,26 @@ octetStringMatch(
return
LDAP_SUCCESS
;
}
static
int
octetStringOrderingMatch
(
int
*
matchp
,
slap_mask_t
flags
,
Syntax
*
syntax
,
MatchingRule
*
mr
,
struct
berval
*
value
,
void
*
assertedValue
)
{
ber_len_t
v_len
=
value
->
bv_len
;
ber_len_t
av_len
=
((
struct
berval
*
)
assertedValue
)
->
bv_len
;
int
match
=
memcmp
(
value
->
bv_val
,
((
struct
berval
*
)
assertedValue
)
->
bv_val
,
(
v_len
<
av_len
?
v_len
:
av_len
)
);
if
(
match
==
0
)
match
=
v_len
-
av_len
;
*
matchp
=
match
;
return
LDAP_SUCCESS
;
}
/* Index generation function */
int
octetStringIndexer
(
slap_mask_t
use
,
...
...
Write
Preview
Markdown
is supported
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