]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/id2entry.c
use slab memory for proxyauthz
[openldap] / servers / slapd / back-ldbm / id2entry.c
index 9a7d9b6d22d75db875a149ecc2d8feb24f3cb54d..086355ff9b3e1fe54fe948bc9ac809b4f7084b2c 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,7 @@ id2entry_add( Backend *be, Entry *e )
 #endif
        key.dsize = sizeof(ID);
 
-       ldap_pvt_thread_mutex_lock( &SLAPD_GLOBAL(entry2str_mutex) );
+       ldap_pvt_thread_mutex_lock( &entry2str_mutex );
        data.dptr = entry2str( e, &len );
        data.dsize = len + 1;
 
@@ -69,7 +69,7 @@ id2entry_add( Backend *be, Entry *e )
        flags = LDBM_REPLACE;
        rc = ldbm_cache_store( db, key, data, flags );
 
-       ldap_pvt_thread_mutex_unlock( &SLAPD_GLOBAL(entry2str_mutex) );
+       ldap_pvt_thread_mutex_unlock( &entry2str_mutex );
 
        ldbm_cache_close( be, db );
 
@@ -186,7 +186,7 @@ id2entry_rw( Backend *be, ID id, int rw )
                return( NULL );
        }
 
-       e = str2entry( data.dptr );
+       e = str2entry2( data.dptr, 0 );
        ldbm_datum_free( db->dbc_db, data );
        ldbm_cache_close( be, db );