Diff for /servers/slapd/back-bdb/dbcache.c between versions 1.15.2.2 and 1.15.2.6

version 1.15.2.2, 2002/07/28 19:16:57 version 1.15.2.6, 2003/03/24 03:54:12
Line 1 Line 1
 /* dbcache.c - manage cache of open databases */  /* dbcache.c - manage cache of open databases */
 /* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/dbcache.c,v 1.15.2.1 2002/04/15 15:21:58 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/dbcache.c,v 1.15.2.5 2003/03/03 17:10:07 kurt Exp $ */
 /*  /*
  * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.   * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file   * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */   */
   
Line 46  bdb_db_hash( Line 46  bdb_db_hash(
 int  int
 bdb_db_cache(  bdb_db_cache(
         Backend *be,          Backend *be,
           DB_TXN *tid,
         const char *name,          const char *name,
         DB **dbout )          DB **dbout )
 {  {
         int i;          int i;
         int rc;          int rc;
           int flags;
         struct bdb_info *bdb = (struct bdb_info *) be->be_private;          struct bdb_info *bdb = (struct bdb_info *) be->be_private;
         struct bdb_db_info *db;          struct bdb_db_info *db;
         char *file;          char *file;
Line 101  bdb_db_cache( Line 103  bdb_db_cache(
   
         rc = db->bdi_db->set_pagesize( db->bdi_db, BDB_PAGESIZE );          rc = db->bdi_db->set_pagesize( db->bdi_db, BDB_PAGESIZE );
         rc = db->bdi_db->set_h_hash( db->bdi_db, bdb_db_hash );          rc = db->bdi_db->set_h_hash( db->bdi_db, bdb_db_hash );
 #ifdef BDB_IDL_MULTI  
         rc = db->bdi_db->set_flags( db->bdi_db, DB_DUP | DB_DUPSORT );          rc = db->bdi_db->set_flags( db->bdi_db, DB_DUP | DB_DUPSORT );
         rc = db->bdi_db->set_dup_compare( db->bdi_db, bdb_bt_compare );          rc = db->bdi_db->set_dup_compare( db->bdi_db, bdb_bt_compare );
 #endif  
   
         file = ch_malloc( strlen( name ) + sizeof(BDB_SUFFIX) );          file = ch_malloc( strlen( name ) + sizeof(BDB_SUFFIX) );
         sprintf( file, "%s" BDB_SUFFIX, name );          sprintf( file, "%s" BDB_SUFFIX, name );
   
         rc = db->bdi_db->open( db->bdi_db,  #ifdef HAVE_EBCDIC
           __atoe( file );
   #endif
           flags = bdb->bi_db_opflags | DB_CREATE | DB_THREAD;
           if ( !tid ) flags |= DB_AUTO_COMMIT;
           rc = DB_OPEN( db->bdi_db, tid,
                 file, name,                  file, name,
                 DB_HASH, bdb->bi_db_opflags | DB_CREATE | DB_THREAD,                  DB_HASH, flags,
                 bdb->bi_dbenv_mode );                  bdb->bi_dbenv_mode );
   
         ch_free( file );          ch_free( file );

Removed from v.1.15.2.2  
changed lines
  Added in v.1.15.2.6


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