+ if( 0 ) {
+retry: /* transaction retry */
+ if ( e != NULL ) {
+ bdb_cache_delete_entry(&bdb->bi_cache, e);
+ bdb_cache_return_entry_w(bdb->bi_dbenv, &bdb->bi_cache, e, &lock);
+ }
+#ifdef NEW_LOGGING
+ LDAP_LOG ( ACL, DETAIL1, "bdb_exop_passwd: retrying...\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: retrying...\n", 0, 0, 0 );
+#endif
+ rc = TXN_ABORT( ltid );
+ ltid = NULL;
+ op->o_private = NULL;
+ if( rc != 0 ) {
+ rc = LDAP_OTHER;
+ *text = "internal error";
+ goto done;
+ }
+ ldap_pvt_thread_yield();
+ }
+
+ /* begin transaction */
+ rc = TXN_BEGIN( bdb->bi_dbenv, NULL, <id,
+ bdb->bi_db_opflags );
+ *text = NULL;
+ if( rc != 0 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( ACL, ERR,
+ "bdb_exop_passwd: txn_begin failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_exop_passwd: txn_begin failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
+#endif
+ rc = LDAP_OTHER;
+ *text = "internal error";
+ goto done;
+ }
+
+ locker = TXN_ID ( ltid );
+
+ opinfo.boi_bdb = be;
+ opinfo.boi_txn = ltid;
+ opinfo.boi_err = 0;
+ op->o_private = &opinfo;
+
+ /* get entry */
+ rc = bdb_dn2entry_w( be, ltid, &ndn, &e, NULL, 0 , locker, &lock);