From: Kurt Zeilenga Date: Wed, 5 Dec 2001 03:13:50 +0000 (+0000) Subject: Enhance error messages from Walter.Mueller@uibk.ac.at X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~779 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6ba3b26c090e2166fec4eb53f745c6384a3ed5d8;p=openldap Enhance error messages from Walter.Mueller@uibk.ac.at --- diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 004bfb4a53..08319972f7 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -1109,7 +1109,9 @@ domodify( i = ldap_modify_s( ld, dn, pmods ); } if ( i != LDAP_SUCCESS ) { - ldap_perror( ld, newentry ? "ldap_add" : "ldap_modify" ); + /* print error message about failed update including DN */ + fprintf( stderr, "%s: update failed: %s\n", prog, dn ); + ldap_perror( ld, newentry ? "ldap_add" : "ldap_modify" ); } else if ( verbose ) { printf( "modify complete\n" ); } @@ -1132,7 +1134,8 @@ dodelete( printf( "%sdeleting entry \"%s\"\n", not ? "!" : "", dn ); if ( !not ) { if (( rc = ldap_delete_s( ld, dn )) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_delete" ); + fprintf( stderr, "%s: delete failed: %s\n", prog, dn ); + ldap_perror( ld, "ldap_delete" ); } else if ( verbose ) { printf( "delete complete" ); } @@ -1163,8 +1166,10 @@ dorename( } if ( !not ) { if (( rc = ldap_rename2_s( ld, dn, newrdn, newsup, deleteoldrdn )) - != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_modrdn" ); + != LDAP_SUCCESS ) + { + fprintf( stderr, "%s: rename failed: %s\n", prog, dn ); + ldap_perror( ld, "ldap_modrdn" ); } else { printf( "modrdn completed\n" ); }