[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4453) ldapdelete prints error message to stdout



Hi,

the attached patch should fix the issue:

--- ldapdelete.c        2006-01-03 23:16:01.000000000 +0100
+++ ldapdelete.c        2006-03-26 13:58:12.000000000 +0200
@@ -263,12 +263,12 @@
                return rc;
        }

-       if( verbose || code != LDAP_SUCCESS ||
-               (matcheddn && *matcheddn) || (text && *text) || (refs && 
*refs) )
-       {
-               printf( _("Delete Result: %s (%d)\n"),
-                       ldap_err2string( code ), code );
+       if (code != LDAP_SUCCESS) {
+               fprintf( stderr, "%s: delete result: %s (%d)\n",
+                       prog, ldap_err2string( code ), code );
+       }

+       if( verbose ) {
                if( text && *text ) {
                        printf( _("Additional info: %s\n"), text );
                }


Hope it helps
Peter

-- 
Peter Marschall
eMail: peter@adpm.de