- if (newSuperior) {
- int version = LDAP_VERSION3;
- ldap_set_option( lc->ld, LDAP_OPT_PROTOCOL_VERSION, &version);
-
- /*
- * Rewrite the new superior, if defined and required
- */
-#ifdef ENABLE_REWRITE
- switch ( rewrite_session( li->rwinfo, "newSuperiorDn",
- newSuperior->bv_val, conn, &mnewSuperior.bv_val ) ) {
- case REWRITE_REGEXEC_OK:
- if ( mnewSuperior.bv_val == NULL ) {
- mnewSuperior.bv_val = ( char * )newSuperior;
- }
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_LDAP, DETAIL1,
- "[rw] newSuperiorDn:" " \"%s\" -> \"%s\"\n",
- newSuperior, mnewSuperior.bv_val, 0 );
-#else /* !NEW_LOGGING */
- Debug( LDAP_DEBUG_ARGS, "rw> newSuperiorDn:"
- " \"%s\" -> \"%s\"\n%s",
- newSuperior->bv_val, mnewSuperior.bv_val, "" );
-#endif /* !NEW_LOGGING */