From: Kurt Zeilenga Date: Thu, 22 Jul 1999 03:42:02 +0000 (+0000) Subject: Release writer lock on new parent. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~65 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0ed1a76d27e827a1bc2fb984ab57a6d0f42c4f89;p=openldap Release writer lock on new parent. --- diff --git a/configure.in b/configure.in index cf47722a80..155377a139 100644 --- a/configure.in +++ b/configure.in @@ -430,6 +430,9 @@ AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb) AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) +dnl +dnl Check for module support +dnl ol_link_modules=no if test $ol_enable_modules != no ; then AC_PATH_PROG(GLIBCONFIG, glib-config) diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 4f743c473c..1b8d49bbca 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -175,13 +175,11 @@ ldbm_back_modrdn( "ldbm_back_modrdn: no parent, locked root\n", 0, 0, 0 ); - }/* if ( (p_ndn = dn_parent( be, e->e_ndn )) != NULL ) else */ + } new_parent_dn = p_dn; /* New Parent unless newSuperior given */ if ( (np_dn = newSuperior) != NULL) { - - Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: new parent requested...\n", 0, 0, 0 ); @@ -189,9 +187,7 @@ ldbm_back_modrdn( np_ndn = dn_normalize_case( ch_strdup( np_dn ) ); /* newSuperior == oldParent?, if so ==> ERROR */ - /* newSuperior == entry being moved?, if so ==> ERROR */ - /* Get Entry with dn=newSuperior. Does newSuperior exist? */ if( (np = dn2entry_w( be, np_ndn, &matched )) == NULL) { @@ -416,13 +412,9 @@ ldbm_back_modrdn( Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: removing old_rdn_val=%s\n", old_rdn_val, 0, 0 ); - - }/* if (deleteoldrdn) */ - + } } else { - - Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DNS DN\n", 0, 0, 0 ); /* XXXV3: not sure of what to do here */ @@ -466,6 +458,7 @@ ldbm_back_modrdn( return_results: if( new_dn != NULL ) free( new_dn ); if( new_ndn != NULL ) free( new_ndn ); + return_results_after: /* NOTE: * new_dn and new_ndn are not deallocated because they are used by @@ -488,6 +481,11 @@ return_results_after: if ( np_dn != NULL ) free( np_dn ); if ( np_ndn != NULL ) free( np_ndn ); + if( np != NULL ) { + /* free new parent and writer lock */ + cache_return_entry_w( &li->li_cache, np ); + } + if( p != NULL ) { /* free parent and writer lock */ cache_return_entry_w( &li->li_cache, p );