version 1.121, 2004/03/09 06:08:04
|
version 1.122, 2004/04/20 01:44:57
|
Line 1
|
Line 1
|
/* filter.c - routines for parsing and dealing with filters */ |
/* filter.c - routines for parsing and dealing with filters */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.120 2004/02/23 10:45:19 ando Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.121 2004/03/09 06:08:04 ando Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 1998-2004 The OpenLDAP Foundation. |
* Copyright 1998-2004 The OpenLDAP Foundation. |
Line 527 get_ssa(
|
Line 527 get_ssa(
|
|| ssa.sa_any != NULL |
|| ssa.sa_any != NULL |
|| ssa.sa_final.bv_val != NULL ) |
|| ssa.sa_final.bv_val != NULL ) |
{ |
{ |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
slap_sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
goto return_error; |
goto return_error; |
} |
} |
|
|
Line 544 get_ssa(
|
Line 544 get_ssa(
|
#endif |
#endif |
|
|
if ( ssa.sa_final.bv_val != NULL ) { |
if ( ssa.sa_final.bv_val != NULL ) { |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
slap_sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
goto return_error; |
goto return_error; |
} |
} |
|
|
Line 561 get_ssa(
|
Line 561 get_ssa(
|
#endif |
#endif |
|
|
if ( ssa.sa_final.bv_val != NULL ) { |
if ( ssa.sa_final.bv_val != NULL ) { |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
slap_sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
goto return_error; |
goto return_error; |
} |
} |
|
|
Line 580 get_ssa(
|
Line 580 get_ssa(
|
#endif |
#endif |
|
|
assert( 0 ); |
assert( 0 ); |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
slap_sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
|
|
return_error: |
return_error: |
#ifdef NEW_LOGGING |
#ifdef NEW_LOGGING |
Line 591 return_error:
|
Line 591 return_error:
|
Debug( LDAP_DEBUG_FILTER, " error=%ld\n", |
Debug( LDAP_DEBUG_FILTER, " error=%ld\n", |
(long) rc, 0, 0 ); |
(long) rc, 0, 0 ); |
#endif |
#endif |
sl_free( ssa.sa_initial.bv_val, op->o_tmpmemctx ); |
slap_sl_free( ssa.sa_initial.bv_val, op->o_tmpmemctx ); |
ber_bvarray_free_x( ssa.sa_any, op->o_tmpmemctx ); |
ber_bvarray_free_x( ssa.sa_any, op->o_tmpmemctx ); |
sl_free( ssa.sa_final.bv_val, op->o_tmpmemctx ); |
slap_sl_free( ssa.sa_final.bv_val, op->o_tmpmemctx ); |
return rc; |
return rc; |
} |
} |
|
|
Line 681 filter_free( Filter *f )
|
Line 681 filter_free( Filter *f )
|
{ |
{ |
Operation op; |
Operation op; |
|
|
op.o_tmpmemctx = sl_context( f ); |
op.o_tmpmemctx = slap_sl_context( f ); |
op.o_tmpmfuncs = &sl_mfuncs; |
op.o_tmpmfuncs = &slap_sl_mfuncs; |
filter_free_x( &op, f ); |
filter_free_x( &op, f ); |
} |
} |
|
|
Line 927 filter_escape_value_x(
|
Line 927 filter_escape_value_x(
|
assert( out ); |
assert( out ); |
|
|
i = in->bv_len * 3 + 1; |
i = in->bv_len * 3 + 1; |
out->bv_val = ctx ? sl_malloc( i, ctx ) : ch_malloc( i ); |
out->bv_val = ctx ? slap_sl_malloc( i, ctx ) : ch_malloc( i ); |
out->bv_len = 0; |
out->bv_len = 0; |
|
|
for( i=0; i < in->bv_len ; i++ ) { |
for( i=0; i < in->bv_len ; i++ ) { |