]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/group.c
Delete extranous assert()
[openldap] / servers / slapd / back-bdb / group.c
index 2e55471eafc1b625dc5f5f8c86e3d20774348dcf..2000de520996c7f849c70efc136ce9ac9bd2c2b1 100644 (file)
@@ -33,9 +33,9 @@ bdb_group(
        AttributeDescription *group_at
 )
 {
-       struct bdbinfo *li = (struct bdbinfo *) be->be_private;
-       struct bdb_op_info *boi = (struct bdb_op_info *) op->o_private;
-       DB_TXN *txn;
+       struct bdb_info *bdb = (struct bdb_info *) be->be_private;
+       struct bdb_op_info *boi = NULL;
+       DB_TXN *txn = NULL;
        Entry *e;
        int     rc = 1;
        Attribute *attr;
@@ -71,6 +71,7 @@ bdb_group(
                target->e_ndn, 0, 0 ); 
 #endif
 
+       if( op ) boi = (struct bdb_op_info *) op->o_private;
        if( boi != NULL && be == boi->boi_bdb ) {
                txn = boi->boi_txn;
        }
@@ -88,7 +89,7 @@ bdb_group(
 #endif
        } else {
                /* can we find group entry */
-               rc = bdb_dn2entry( be, txn, gr_ndn, &e, NULL, 0 );
+               rc = bdb_dn2entry_r( be, NULL, gr_ndn, &e, NULL, 0 ); 
                if( rc ) {
                        if( txn ) {
                                boi->boi_err = rc;
@@ -123,6 +124,7 @@ bdb_group(
         */
        rc = 1;
 
+#ifdef BDB_ALIASES
        if( is_entry_alias( e ) ) {
 #ifdef NEW_LOGGING
                LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
@@ -133,6 +135,7 @@ bdb_group(
 #endif
                goto return_results;
        }
+#endif
 
        if( is_entry_referral( e ) ) {
 #ifdef NEW_LOGGING
@@ -145,7 +148,7 @@ bdb_group(
                goto return_results;
        }
 
-       if( !is_entry_objectclass( e, group_oc ) ) {
+       if( !is_entry_objectclass( e, group_oc, 0 ) ) {
 #ifdef NEW_LOGGING
                LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
                        "bdb_group: failed to find %s in objectClass.\n",
@@ -208,7 +211,7 @@ bdb_group(
 return_results:
        if( target != e ) {
                /* free entry */
-               bdb_entry_return( be, e );
+               bdb_cache_return_entry_r( &bdb->bi_cache, e );
        }
 
 #ifdef NEW_LOGGING