Diff for /servers/slapd/filter.c between versions 1.125.2.4 and 1.125.2.5

version 1.125.2.4, 2005/08/26 00:18:02 version 1.125.2.5, 2005/11/26 23:54:48
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.130 2005/08/25 19:14:26 ando Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.125.2.4 2005/08/26 00:18:02 kurt 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-2005 The OpenLDAP Foundation.   * Copyright 1998-2005 The OpenLDAP Foundation.
Line 45  static int get_ssa( Line 45  static int get_ssa(
         SubstringsAssertion **s,          SubstringsAssertion **s,
         const char **text );          const char **text );
   
 static int filter_escape_value_x(  
         struct berval *in,  
         struct berval *out,  
         void *ctx );  
   
 static void simple_vrFilter2bv(  static void simple_vrFilter2bv(
         Operation *op,          Operation *op,
         ValuesReturnFilter *f,          ValuesReturnFilter *f,
Line 783  filter2bv( Filter *f, struct berval *fst Line 778  filter2bv( Filter *f, struct berval *fst
 }  }
   
 static int  static int
 filter_escape_value_x(  
         struct berval *in,  
         struct berval *out,  
         void *ctx )  
 {  
         ber_len_t i;  
         assert( in != NULL );  
         assert( out != NULL );  
   
         i = in->bv_len * 3 + 1;  
         out->bv_val = ctx ? slap_sl_malloc( i, ctx ) : ch_malloc( i );  
         out->bv_len = 0;  
   
         for( i=0; i < in->bv_len ; i++ ) {  
                 if( FILTER_ESCAPE(in->bv_val[i]) ) {  
                         out->bv_val[out->bv_len++] = SLAP_ESCAPE_CHAR;  
                         out->bv_val[out->bv_len++] = SLAP_ESCAPE_HI( in->bv_val[i] );  
                         out->bv_val[out->bv_len++] = SLAP_ESCAPE_LO( in->bv_val[i] );  
                 } else {  
                         out->bv_val[out->bv_len++] = in->bv_val[i];  
                 }  
         }  
   
         out->bv_val[out->bv_len] = '\0';  
         return LDAP_SUCCESS;  
 }  
   
 int  
 filter_escape_value(  
         struct berval *in,  
         struct berval *out )  
 {  
         return filter_escape_value_x( in, out, NULL );  
 }  
   
 static int  
 get_simple_vrFilter(  get_simple_vrFilter(
         Operation *op,          Operation *op,
         BerElement *ber,          BerElement *ber,

Removed from v.1.125.2.4  
changed lines
  Added in v.1.125.2.5


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org