From: Luke Howard Date: Wed, 20 Jul 2005 08:19:22 +0000 (+0000) Subject: Fix order of statements in SLAPI internal modrdn implementation X-Git-Tag: OPENLDAP_AC_BP~311 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d6d202693dfea3ec9d9dce12610e9c5612ecfea1;p=openldap Fix order of statements in SLAPI internal modrdn implementation --- diff --git a/servers/slapd/slapi/slapi_ops.c b/servers/slapd/slapi/slapi_ops.c index 73b2fbbad9..c5f327150a 100644 --- a/servers/slapd/slapi/slapi_ops.c +++ b/servers/slapd/slapi/slapi_ops.c @@ -792,15 +792,6 @@ slapi_modrdn_internal_pb( Slapi_PBlock *pb ) manageDsaIt = isCritical ? SLAP_CONTROL_CRITICAL : SLAP_CONTROL_NONCRITICAL; } - op->o_bd = select_backend( &op->o_req_ndn, manageDsaIt, 1 ); - if ( op->o_bd == NULL ) { - rs.sr_err = LDAP_PARTIAL_RESULTS; - goto cleanup; - } - - op->o_dn = pConn->c_dn = op->o_bd->be_rootdn; - op->o_ndn = pConn->c_ndn = op->o_bd->be_rootndn; - dn.bv_val = (char *)olddn; dn.bv_len = strlen( olddn ); @@ -814,6 +805,15 @@ slapi_modrdn_internal_pb( Slapi_PBlock *pb ) goto cleanup; } + op->o_bd = select_backend( &op->o_req_ndn, manageDsaIt, 1 ); + if ( op->o_bd == NULL ) { + rs.sr_err = LDAP_PARTIAL_RESULTS; + goto cleanup; + } + + op->o_dn = pConn->c_dn = op->o_bd->be_rootdn; + op->o_ndn = pConn->c_ndn = op->o_bd->be_rootndn; + newrdn.bv_val = (char *)lnewrdn; newrdn.bv_len = strlen( lnewrdn );