]> git.sur5r.net Git - openldap/commitdiff
Additional TXN changes (a work in progress)
authorKurt Zeilenga <kurt@openldap.org>
Thu, 30 Mar 2006 18:00:04 +0000 (18:00 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 30 Mar 2006 18:00:04 +0000 (18:00 +0000)
clients/tools/ldapmodify.c
libraries/libldap/error.c

index fac525ba81e6a4314459e6086354f7ea95eb1fc1..69443df038951901b83bc7f4f7e451c6d45728fe 100644 (file)
@@ -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 ) {
index c80465ecbdb1819320be31f57c71331a1a227af7..ac28ccc880138617822cae3a23fb16c7e06d8de9 100644 (file)
@@ -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")},