Diff for /servers/slapd/filter.c between versions 1.134.2.15 and 1.150

version 1.134.2.15, 2008/11/11 19:30:37 version 1.150, 2008/09/05 22:00:37
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.134.2.14 2008/11/08 00:28:43 quanah Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.149 2008/02/18 18:47:07 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-2008 The OpenLDAP Foundation.   * Copyright 1998-2008 The OpenLDAP Foundation.
Line 385  get_ssa( Line 385  get_ssa(
   
         rc = LDAP_PROTOCOL_ERROR;          rc = LDAP_PROTOCOL_ERROR;
   
         if ( ssa.sa_desc->ad_type->sat_substr == NULL ) {  
                 for ( tag = ber_first_element( ber, &len, &last );  
                         tag != LBER_DEFAULT;  
                         tag = ber_next_element( ber, &len, last ) )  
                 {  
                         /* eat all */  
                         rc = ber_scanf( ber, "x" );  
                 }  
   
                 rc = LDAP_INVALID_SYNTAX;  
                 goto return_error;  
         }  
   
         for ( tag = ber_first_element( ber, &len, &last );          for ( tag = ber_first_element( ber, &len, &last );
                 tag != LBER_DEFAULT;                  tag != LBER_DEFAULT;
                 tag = ber_next_element( ber, &len, last ) )                  tag = ber_next_element( ber, &len, last ) )
Line 505  return_error: Line 492  return_error:
 }  }
   
 void  void
 filter_free_x( Operation *op, Filter *f, int freeme )  filter_free_x( Operation *op, Filter *f )
 {  {
         Filter  *p, *next;          Filter  *p, *next;
   
Line 544  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, 1 );                          filter_free_x( op, p );
                 }                  }
                 break;                  break;
   
Line 561  filter_free_x( Operation *op, Filter *f, Line 548  filter_free_x( Operation *op, Filter *f,
                 break;                  break;
         }          }
   
         if ( freeme ) {          op->o_tmpfree( f, op->o_tmpmemctx );
                 op->o_tmpfree( f, op->o_tmpmemctx );  
         }  
 }  }
   
 void  void
Line 575  filter_free( Filter *f ) Line 560  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, 1 );          filter_free_x( &op, f );
 }  }
   
 void  void

Removed from v.1.134.2.15  
changed lines
  Added in v.1.150


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