From: Kurt Zeilenga Date: Thu, 28 Sep 2000 00:02:47 +0000 (+0000) Subject: Mostly working modify X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1873 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=373479e5b8852689e00ef3ef28d23fcb3e283a3d;p=openldap Mostly working modify --- diff --git a/servers/slapd/back-bdb/dn2entry.c b/servers/slapd/back-bdb/dn2entry.c index f0ba6c7731..b84a4a5020 100644 --- a/servers/slapd/back-bdb/dn2entry.c +++ b/servers/slapd/back-bdb/dn2entry.c @@ -30,7 +30,7 @@ bdb_dn2entry( ID id; char *matchedDN = NULL; - Debug(LDAP_DEBUG_TRACE, "bdb_dn2entry: dn: \"%s\"\n", + Debug(LDAP_DEBUG_TRACE, "bdb_dn2entry(\"%s\")\n", dn, 0, 0 ); *e = NULL; diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index 3479310f47..671e8197cf 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -288,8 +288,8 @@ bdb_dn2id_matched( } Debug( LDAP_DEBUG_TRACE, - "<= bdb_dn2id_matched: id=0x%08lx: %s\n", - *id, dn, 0 ); + "<= bdb_dn2id_matched: id=0x%08lx: %s %s\n", + *id, *matchedDN == NULL ? "entry" : "matched", dn ); break; } else { diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 77a4849280..83ffc3f029 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -318,8 +318,8 @@ bdb_initialize( bi->bi_acl_group = bdb_group; bi->bi_acl_attribute = bdb_attribute; -#endif bi->bi_chk_referrals = bdb_referrals; +#endif bi->bi_entry_release_rw = 0; diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index 46717f07a7..24b45759e9 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -23,7 +23,6 @@ int bdb_modify_internal( Connection *conn, Operation *op, DB_TXN *tid, - const char *dn, Modifications *modlist, Entry *e, const char **text ) @@ -33,7 +32,8 @@ int bdb_modify_internal( Modifications *ml; Attribute *save_attrs; - Debug(LDAP_DEBUG_TRACE, "bdb_modify_internal: %s\n", dn, 0, 0); + Debug( LDAP_DEBUG_TRACE, "bdb_modify_internal: 0x%08lx: %s\n", + e->e_id, e->e_dn, 0); if ( !acl_check_modlist( be, conn, op, e, modlist )) { return LDAP_INSUFFICIENT_ACCESS; @@ -146,8 +146,7 @@ bdb_modify( Operation *op, const char *dn, const char *ndn, - Modifications *modlist -) + Modifications *modlist ) { struct bdb_info *bdb = (struct bdb_info *) be->be_private; int rc; @@ -158,11 +157,13 @@ bdb_modify( DB_TXN *ltid; struct bdb_op_info opinfo; - Debug(LDAP_DEBUG_ARGS, "bdb_back_modify: %s\n", dn, 0, 0); + Debug( LDAP_DEBUG_ARGS, "bdb_modify: %s\n", dn, 0, 0 ); if (0) { - /* transaction retry */ -retry: rc = txn_abort( ltid ); +retry: /* transaction retry */ + Debug(LDAP_DEBUG_TRACE, + "bdb_modify: retrying...\n", 0, 0, 0); + rc = txn_abort( ltid ); ltid = NULL; op->o_private = NULL; if( rc != 0 ) { @@ -253,7 +254,7 @@ retry: rc = txn_abort( ltid ); } /* Modify the entry */ - rc = bdb_modify_internal( be, conn, op, ltid, ndn, modlist, e, &text ); + rc = bdb_modify_internal( be, conn, op, ltid, modlist, e, &text ); if( rc != LDAP_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, @@ -294,7 +295,7 @@ retry: rc = txn_abort( ltid ); text = "commit failed"; } else { Debug( LDAP_DEBUG_TRACE, - "bdb_modify: added id=%08x dn=\"%s\"\n", + "bdb_modify: updated id=%08x dn=\"%s\"\n", e->e_id, e->e_dn, 0 ); rc = LDAP_SUCCESS; text = NULL; diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index 456f1b49e2..36c1bed49c 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -449,7 +449,7 @@ retry: rc = txn_abort( ltid ); } /* modify entry */ - rc = bdb_modify_internal( be, conn, op, ltid, dn, &mod[0], e, &text ); + rc = bdb_modify_internal( be, conn, op, ltid, &mod[0], e, &text ); if( rc != LDAP_SUCCESS ) { goto return_results; diff --git a/servers/slapd/back-bdb/passwd.c b/servers/slapd/back-bdb/passwd.c index 2731bd5a73..09b4bc4ed5 100644 --- a/servers/slapd/back-bdb/passwd.c +++ b/servers/slapd/back-bdb/passwd.c @@ -160,7 +160,7 @@ retry: rc = txn_abort( ltid ); ml.sml_next = NULL; rc = bdb_modify_internal( be, conn, op, ltid, - op->o_ndn, &ml, e, text ); + &ml, e, text ); switch(rc) { case DB_LOCK_DEADLOCK: diff --git a/servers/slapd/back-bdb/proto-bdb.h b/servers/slapd/back-bdb/proto-bdb.h index e4cc6e11fd..04cab9d048 100644 --- a/servers/slapd/back-bdb/proto-bdb.h +++ b/servers/slapd/back-bdb/proto-bdb.h @@ -130,7 +130,6 @@ int bdb_modify_internal( Connection *conn, Operation *op, DB_TXN *tid, - const char *dn, Modifications *modlist, Entry *e, const char **text );