mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
Additional TXN changes (a work in progress)
This commit is contained in:
parent
c99fabb1ed
commit
40d75df606
2 changed files with 14 additions and 4 deletions
|
|
@ -1027,7 +1027,8 @@ domodify(
|
|||
if ( rc != LDAP_SUCCESS ) {
|
||||
/* print error message about failed update including DN */
|
||||
fprintf( stderr, _("%s: update failed: %s\n"), prog, dn );
|
||||
tool_perror( newentry ? "ldap_add" : "ldap_modify", rc, NULL, NULL, NULL, NULL );
|
||||
tool_perror( newentry ? "ldap_add" : "ldap_modify",
|
||||
rc, NULL, NULL, NULL, NULL );
|
||||
goto done;
|
||||
} else if ( verbose ) {
|
||||
printf( _("modify complete\n") );
|
||||
|
|
@ -1098,10 +1099,10 @@ dorename(
|
|||
pctrls, NULL, &msgid );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
fprintf( stderr, _("%s: rename failed: %s\n"), prog, dn );
|
||||
tool_perror( "ldap_modrdn", rc, NULL, NULL, NULL, NULL );
|
||||
tool_perror( "ldap_rename", rc, NULL, NULL, NULL, NULL );
|
||||
goto done;
|
||||
} else {
|
||||
printf( _("modrdn completed\n") );
|
||||
printf( _("rename completed\n") );
|
||||
}
|
||||
|
||||
rc = process_response( ld, msgid, LDAP_RES_RENAME, dn );
|
||||
|
|
@ -1125,7 +1126,7 @@ res2str( int res ) {
|
|||
case LDAP_RES_MODIFY:
|
||||
return "ldap_modify";
|
||||
case LDAP_RES_MODRDN:
|
||||
return "ldap_modrdn";
|
||||
return "ldap_rename";
|
||||
default:
|
||||
assert( 0 );
|
||||
}
|
||||
|
|
@ -1170,6 +1171,11 @@ static int process_response(
|
|||
rc = ldap_parse_result( ld, res, &err, &matched, &text, &refs, &ctrls, 1 );
|
||||
if ( rc == LDAP_SUCCESS ) rc = err;
|
||||
|
||||
#ifdef LDAP_X_TXN
|
||||
if ( rc == LDAP_X_TXN_SPECIFY_OKAY ) {
|
||||
rc = LDAP_SUCCESS;
|
||||
} else
|
||||
#endif
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
tool_perror( res2str( op ), rc, NULL, matched, text, refs );
|
||||
} else if ( msgtype != op ) {
|
||||
|
|
|
|||
|
|
@ -106,6 +106,10 @@ static struct ldaperror ldap_builtin_errlist[] = {
|
|||
{LDAP_CUP_UNSUPPORTED_SCHEME, N_("LCUP Unsupported Scheme")},
|
||||
{LDAP_CUP_RELOAD_REQUIRED, N_("LCUP Reload Required")},
|
||||
|
||||
#ifdef LDAP_X_TXN
|
||||
{LDAP_X_TXN_SPECIFY_OKAY, N_("TXN specify okay")},
|
||||
{LDAP_X_TXN_ID_INVALID, N_("TXN ID is invalid")},
|
||||
#endif
|
||||
|
||||
/* API ResultCodes */
|
||||
{LDAP_SERVER_DOWN, N_("Can't contact LDAP server")},
|
||||
|
|
|
|||
Loading…
Reference in a new issue