]> git.sur5r.net Git - openldap/commitdiff
ITS#4453 don't print error message on stdout
authorHoward Chu <hyc@openldap.org>
Fri, 12 May 2006 07:56:20 +0000 (07:56 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 12 May 2006 07:56:20 +0000 (07:56 +0000)
clients/tools/ldapdelete.c

index 8bbc1c46635ca5426e083295d8aab4e1fd7629b0..2e7d42f82b6ddf4709942b6229fec25b78e6db2a 100644 (file)
@@ -261,8 +261,10 @@ static int dodelete(
                return rc;
        }
 
-       if( verbose || code != LDAP_SUCCESS ||
-               (matcheddn && *matcheddn) || (text && *text) || (refs && *refs) )
+       if( code != LDAP_SUCCESS ) {
+               tool_perror( "ldap_delete", code, NULL, matcheddn, text, refs );
+       } else if ( verbose && 
+               ((matcheddn && *matcheddn) || (text && *text) || (refs && *refs) ))
        {
                printf( _("Delete Result: %s (%d)\n"),
                        ldap_err2string( code ), code );