Diff for /servers/slapd/overlays/rwm.c between versions 1.37.2.12 and 1.37.2.13

version 1.37.2.12, 2005/09/28 00:30:35 version 1.37.2.13, 2005/11/03 18:03:02
Line 1 Line 1
 /* rwm.c - rewrite/remap operations */  /* rwm.c - rewrite/remap operations */
 /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/rwm.c,v 1.65 2005/09/06 05:13:14 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/rwm.c,v 1.67 2005/11/03 12:34:43 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 2003-2005 The OpenLDAP Foundation.   * Copyright 2003-2005 The OpenLDAP Foundation.
Line 695  rwm_op_search( Operation *op, SlapReply Line 695  rwm_op_search( Operation *op, SlapReply
         dc.normalized = 0;          dc.normalized = 0;
 #endif /* ! ENABLE_REWRITE */  #endif /* ! ENABLE_REWRITE */
   
         rc = rwm_filter_map_rewrite( &dc, op->ors_filter, &fstr );          rc = rwm_filter_map_rewrite( op, &dc, op->ors_filter, &fstr );
         if ( rc != LDAP_SUCCESS ) {          if ( rc != LDAP_SUCCESS ) {
                 text = "searchFilter/searchFilterAttrDN massage error";                  text = "searchFilter/searchFilterAttrDN massage error";
                 goto error_return;                  goto error_return;
Line 1043  rwm_send_entry( Operation *op, SlapReply Line 1043  rwm_send_entry( Operation *op, SlapReply
                         goto fail;                          goto fail;
                 }                  }
   
                   flags &= ~REP_ENTRY_MUSTRELEASE;
                 flags |= ( REP_ENTRY_MODIFIABLE | REP_ENTRY_MUSTBEFREED );                  flags |= ( REP_ENTRY_MODIFIABLE | REP_ENTRY_MUSTBEFREED );
         }          }
   
Line 1075  rwm_send_entry( Operation *op, SlapReply Line 1076  rwm_send_entry( Operation *op, SlapReply
          * to return, and remap them accordingly */           * to return, and remap them accordingly */
         (void)rwm_attrs( op, rs, &e->e_attrs, 1 );          (void)rwm_attrs( op, rs, &e->e_attrs, 1 );
   
 #if 0          if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) {
         if ( rs->sr_operational_attrs ) {                  be_entry_release_rw( op, rs->sr_entry, 0 );
                 (void)rwm_attrs( op, rs, &rs->sr_operational_attrs, 0 );  
         }          }
 #endif  
   
         rs->sr_entry = e;          rs->sr_entry = e;
         rs->sr_flags = flags;          rs->sr_flags = flags;
Line 1395  rwm_db_config( Line 1394  rwm_db_config(
                 } else if ( strcasecmp( argv[ 1 ], "yes" ) == 0 ) {                  } else if ( strcasecmp( argv[ 1 ], "yes" ) == 0 ) {
                         rwmap->rwm_flags |= RWM_F_SUPPORT_T_F;                          rwmap->rwm_flags |= RWM_F_SUPPORT_T_F;
   
 #if 0  
                 /* TODO: not implemented yet */                  /* TODO: not implemented yet */
                 } else if ( strcasecmp( argv[ 1 ], "discover" ) == 0 ) {                  } else if ( strcasecmp( argv[ 1 ], "discover" ) == 0 ) {
                           fprintf( stderr,
                   "%s: line %d: \"discover\" not supported yet "
                   "in \"t-f-support {no|yes|discover}\".\n",
                                           fname, lineno );
                           return( 1 );
   #if 0
                         rwmap->rwm_flags |= RWM_F_SUPPORT_T_F_DISCOVER;                          rwmap->rwm_flags |= RWM_F_SUPPORT_T_F_DISCOVER;
 #endif  #endif
   
Line 1477  rwm_db_destroy( Line 1481  rwm_db_destroy(
                         (struct ldaprwmap *)on->on_bi.bi_private;                          (struct ldaprwmap *)on->on_bi.bi_private;
   
 #ifdef ENABLE_REWRITE  #ifdef ENABLE_REWRITE
                 if (rwmap->rwm_rw) {                  if ( rwmap->rwm_rw ) {
                         rewrite_info_delete( &rwmap->rwm_rw );                          rewrite_info_delete( &rwmap->rwm_rw );
                 }                  }
 #else /* !ENABLE_REWRITE */  #else /* !ENABLE_REWRITE */
Line 1486  rwm_db_destroy( Line 1490  rwm_db_destroy(
                 }                  }
 #endif /* !ENABLE_REWRITE */  #endif /* !ENABLE_REWRITE */
   
                 avl_free( rwmap->rwm_oc.remap, NULL );                  avl_free( rwmap->rwm_oc.remap, rwm_mapping_dst_free );
                 avl_free( rwmap->rwm_oc.map, rwm_mapping_free );                  avl_free( rwmap->rwm_oc.map, rwm_mapping_free );
                 avl_free( rwmap->rwm_at.remap, NULL );                  avl_free( rwmap->rwm_at.remap, rwm_mapping_dst_free );
                 avl_free( rwmap->rwm_at.map, rwm_mapping_free );                  avl_free( rwmap->rwm_at.map, rwm_mapping_free );
   
                 ch_free( rwmap );                  ch_free( rwmap );

Removed from v.1.37.2.12  
changed lines
  Added in v.1.37.2.13


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