Diff for /servers/slapd/back-bdb/dn2id.c between versions 1.50.2.6 and 1.50.2.7

version 1.50.2.6, 2002/09/19 20:04:16 version 1.50.2.7, 2002/12/14 21:11:51
Line 1 Line 1
 /* dn2id.c - routines to deal with the dn2id index */  /* dn2id.c - routines to deal with the dn2id index */
 /* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/dn2id.c,v 1.50.2.5 2002/08/29 02:10:47 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/dn2id.c,v 1.50.2.6 2002/09/19 20:04:16 kurt Exp $ */
 /*  /*
  * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.   * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file   * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
Line 613  typedef struct idNode { Line 613  typedef struct idNode {
  */   */
 static int  static int
 node_find_cmp(  node_find_cmp(
         ID id,          const void *id,
         idNode *n          const void *node
 )  )
 {  {
         return id - n->i_id;          return *(const ID *)id - ((const idNode *)node)->i_id;
 }  }
   
 static int  static int
Line 653  idNode * bdb_find_id_node( Line 653  idNode * bdb_find_id_node(
         Avlnode *tree          Avlnode *tree
 )  )
 {  {
         return avl_find(tree, (const void *)id, (AVL_CMP)node_find_cmp);          return avl_find(tree, &id, node_find_cmp);
 }  }
   
 idNode * bdb_find_rdn_node(  idNode * bdb_find_rdn_node(
Line 876  bdb_dn2id_delete( Line 876  bdb_dn2id_delete(
         rc = db->del( db, txn, &key, 0);          rc = db->del( db, txn, &key, 0);
   
         ldap_pvt_thread_rdwr_wlock(&bdb->bi_tree_rdwr);          ldap_pvt_thread_rdwr_wlock(&bdb->bi_tree_rdwr);
         n = avl_delete(&bdb->bi_tree, (void *)e->e_id, (AVL_CMP)node_find_cmp);          n = avl_delete(&bdb->bi_tree, &e->e_id, node_find_cmp);
         if (n) {          if (n) {
                 if (n->i_parent) {                  if (n->i_parent) {
                         ldap_pvt_thread_rdwr_wlock(&n->i_parent->i_kids_rdwr);                          ldap_pvt_thread_rdwr_wlock(&n->i_parent->i_kids_rdwr);

Removed from v.1.50.2.6  
changed lines
  Added in v.1.50.2.7


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