Diff for /servers/slapd/filter.c between versions 1.147 and 1.151

version 1.147, 2007/11/09 06:28:42 version 1.151, 2008/10/09 20:34:43
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.146 2007/11/07 03:02:21 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.150 2008/09/05 22:00:37 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-2007 The OpenLDAP Foundation.   * Copyright 1998-2008 The OpenLDAP Foundation.
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
Line 478  return_error: Line 478  return_error:
                         return rc;                          return rc;
                 }                  }
   
                   *text = NULL;
                 rc = LDAP_SUCCESS;                  rc = LDAP_SUCCESS;
         }          }
   
Line 491  return_error: Line 492  return_error:
 }  }
   
 void  void
 filter_free_x( Operation *op, Filter *f )  filter_free_x( Operation *op, Filter *f, int freeme )
 {  {
         Filter  *p, *next;          Filter  *p, *next;
   
Line 530  filter_free_x( Operation *op, Filter *f Line 531  filter_free_x( Operation *op, Filter *f
         case LDAP_FILTER_NOT:          case LDAP_FILTER_NOT:
                 for ( p = f->f_list; p != NULL; p = next ) {                  for ( p = f->f_list; p != NULL; p = next ) {
                         next = p->f_next;                          next = p->f_next;
                         filter_free_x( op, p );                          filter_free_x( op, p, 1 );
                 }                  }
                 break;                  break;
   
Line 547  filter_free_x( Operation *op, Filter *f Line 548  filter_free_x( Operation *op, Filter *f
                 break;                  break;
         }          }
   
         op->o_tmpfree( f, op->o_tmpmemctx );          if ( freeme ) {
                   op->o_tmpfree( f, op->o_tmpmemctx );
           }
 }  }
   
 void  void
Line 559  filter_free( Filter *f ) Line 562  filter_free( Filter *f )
         op.o_hdr = &ohdr;          op.o_hdr = &ohdr;
         op.o_tmpmemctx = slap_sl_context( f );          op.o_tmpmemctx = slap_sl_context( f );
         op.o_tmpmfuncs = &slap_sl_mfuncs;          op.o_tmpmfuncs = &slap_sl_mfuncs;
         filter_free_x( &op, f );          filter_free_x( &op, f, 1 );
 }  }
   
 void  void
Line 608  filter2bv_x( Operation *op, Filter *f, s Line 611  filter2bv_x( Operation *op, Filter *f, s
 simple:  simple:
                 value = f->f_av_value;                  value = f->f_av_value;
                 if ( f->f_av_desc->ad_type->sat_equality &&                  if ( f->f_av_desc->ad_type->sat_equality &&
                         ( f->f_av_desc->ad_type->sat_equality->smr_usage & SLAP_MR_MUTATION_NORMALIZER )) {                          !undef &&
                           ( f->f_av_desc->ad_type->sat_equality->smr_usage & SLAP_MR_MUTATION_NORMALIZER ))
                   {
                         f->f_av_desc->ad_type->sat_equality->smr_normalize(                          f->f_av_desc->ad_type->sat_equality->smr_normalize(
                                 (SLAP_MR_DENORMALIZE|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX),                                  (SLAP_MR_DENORMALIZE|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX),
                                 NULL, NULL, &f->f_av_value, &value, op->o_tmpmemctx );                                  NULL, NULL, &f->f_av_value, &value, op->o_tmpmemctx );

Removed from v.1.147  
changed lines
  Added in v.1.151


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