]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/entry.c
Notices and acknowledgements
[openldap] / servers / slapd / back-ldbm / entry.c
index cda24c91551c90e7790ef99c4d09dd5cd7916c21..a3f15e7771889151186a98772505d49c7ad2be9d 100644 (file)
 
 int
 ldbm_back_entry_release_rw(
-       Backend *be,
-       Connection *conn,
        Operation *op,
        Entry   *e,
        int     rw
 )
 {
-       struct ldbminfo *li = (struct ldbminfo *) be->be_private;
+       struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
 
        if ( slapMode == SLAP_SERVER_MODE ) {
                /* free entry and reader or writer lock */
@@ -54,8 +52,6 @@ ldbm_back_entry_release_rw(
 /* return LDAP_SUCCESS IFF we can retrieve the specified entry.
  */
 int ldbm_back_entry_get(
-       BackendDB *be,
-       Connection *c,
        Operation *op,
        struct berval *ndn,
        ObjectClass *oc,
@@ -63,15 +59,15 @@ int ldbm_back_entry_get(
        int rw,
        Entry **ent )
 {
-       struct ldbminfo *li = (struct ldbminfo *) be->be_private;
+       struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
        Entry *e;
        int     rc;
-       const char *at_name = at->ad_cname.bv_val;
+       const char *at_name = at ? at->ad_cname.bv_val : "(null)";
 
 #ifdef NEW_LOGGING
-       LDAP_LOG( BACK_BDB, ARGS, 
+       LDAP_LOG( BACK_LDBM, ARGS, 
                "ldbm_back_entry_get: ndn: \"%s\"\n", ndn->bv_val, 0, 0 );
-       LDAP_LOG( BACK_BDB, ARGS, 
+       LDAP_LOG( BACK_LDBM, ARGS, 
                "ldbm_back_entry_get: oc: \"%s\", at: \"%s\"\n",
                oc ? oc->soc_cname.bv_val : "(null)", at_name, 0);
 #else
@@ -85,10 +81,10 @@ int ldbm_back_entry_get(
        /* don't grab the giant lock - our caller has already gotten it. */
 
        /* can we find entry */
-       e = dn2entry_rw( be, ndn, NULL, rw );
+       e = dn2entry_rw( op->o_bd, ndn, NULL, rw );
        if (e == NULL) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: cannot find entry (%s)\n", 
                        ndn->bv_val, 0, 0 );
 #else
@@ -100,7 +96,7 @@ int ldbm_back_entry_get(
        }
        
 #ifdef NEW_LOGGING
-       LDAP_LOG( BACK_BDB, DETAIL1, "ldbm_back_entry_get: found entry (%s)\n",
+       LDAP_LOG( BACK_LDBM, DETAIL1, "ldbm_back_entry_get: found entry (%s)\n",
                ndn->bv_val, 0, 0 );
 #else
        Debug( LDAP_DEBUG_ACL,
@@ -112,7 +108,7 @@ int ldbm_back_entry_get(
        /* find attribute values */
        if( is_entry_alias( e ) ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: entry (%s) is an alias\n", e->e_name.bv_val, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ACL,
@@ -125,7 +121,7 @@ int ldbm_back_entry_get(
 
        if( is_entry_referral( e ) ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: entry (%s) is a referral.\n", e->e_name.bv_val, 0, 0);
 #else
                Debug( LDAP_DEBUG_ACL,
@@ -137,7 +133,7 @@ int ldbm_back_entry_get(
 
        if ( oc && !is_entry_objectclass( e, oc, 0 )) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: failed to find objectClass.\n", 0, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ACL,
@@ -159,7 +155,7 @@ return_results:
        }
 
 #ifdef NEW_LOGGING
-       LDAP_LOG( BACK_BDB, ENTRY, "ldbm_back_entry_get: rc=%d\n", rc, 0, 0 );
+       LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_entry_get: rc=%d\n", rc, 0, 0 );
 #else
        Debug( LDAP_DEBUG_TRACE,
                "ldbm_back_entry_get: rc=%d\n",