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
Tero Saarni
OpenLDAP
Commits
27068377
Commit
27068377
authored
Jun 03, 2011
by
Howard Chu
Committed by
Quanah Gibson-Mount
Jun 08, 2011
Browse files
ITS#6831 fix filter comparison
parent
3f07566c
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/pcache.c
View file @
27068377
...
...
@@ -1251,6 +1251,11 @@ filter_first( Filter *f )
return
f
;
}
typedef
struct
fstack
{
struct
fstack
*
fs_next
;
Filter
*
fs_fs
;
Filter
*
fs_fi
;
}
fstack
;
static
CachedQuery
*
find_filter
(
Operation
*
op
,
Avlnode
*
root
,
Filter
*
inputf
,
Filter
*
first
)
...
...
@@ -1262,6 +1267,7 @@ find_filter( Operation *op, Avlnode *root, Filter *inputf, Filter *first )
int
ret
,
rc
,
dir
;
Avlnode
*
ptr
;
CachedQuery
cq
,
*
qc
;
fstack
*
stack
=
NULL
,
*
fsp
;
cq
.
filter
=
inputf
;
cq
.
first
=
first
;
...
...
@@ -1339,6 +1345,12 @@ nextpass: eqpass = 1;
case
LDAP_FILTER_AND
:
fs
=
fs
->
f_and
;
fi
=
fi
->
f_and
;
/* save our stack position */
fsp
=
op
->
o_tmpalloc
(
sizeof
(
fstack
),
op
->
o_tmpmemctx
);
fsp
->
fs_next
=
stack
;
fsp
->
fs_fs
=
fs
->
f_next
;
fsp
->
fs_fi
=
fi
->
f_next
;
stack
=
fsp
;
res
=
1
;
break
;
case
LDAP_FILTER_SUBSTRINGS
:
...
...
@@ -1386,6 +1398,13 @@ nextpass: eqpass = 1;
default:
break
;
}
if
(
!
fs
&&
!
fi
&&
stack
)
{
fsp
=
stack
;
stack
=
fsp
->
fs_next
;
fs
=
fsp
->
fs_fs
;
fi
=
fsp
->
fs_fi
;
op
->
o_tmpfree
(
fsp
,
op
->
o_tmpmemctx
);
}
}
while
((
res
)
&&
(
fi
!=
NULL
)
&&
(
fs
!=
NULL
));
if
(
res
)
...
...
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