Control: tag -1 moreinfo

Hi Chris,

On Thu, Apr 03, 2008 at 05:16:33PM -0400, Chris Adams wrote:
Here's the offending code:

if( !ldif ) {
        printf( "result: %d %s\n", err, ldap_err2string(err) );
} else if ( err != LDAP_SUCCESS ) {
        fprintf( stderr, "%s (%d)\n", ldap_err2string(err), err );
}

Basically, I'd like to change ldapsearch.c so errors are always reported to stderr rather than only when -L is also specified. It looks like most of the other error cases do this, although I did notice that some of the LDAP_SYNC stuff sends errors to stdout, too.

if ( err != LDAP_SUCCESS ) {
fprintf( stderr, "Search failed: %s (%d)\n", ldap_err2string(err), err );
}

if( !ldif ) {
        printf( "result: %d %s\n", err, ldap_err2string(err) );
}

I've attached a patch which also changes the two other places where printf was used to report abnormal conditions to use frpintf(stderr instead of printf.

On Thu, Apr 03, 2008 at 02:20:23PM -0700, Quanah Gibson-Mount wrote:
I'd advise you take this up with the upstream developers if you really feel this is a worthwhile change. Either file an ITS at <http://www.openldap.org/its/> or send an email describing your thoughts to [email protected].

Following up on this old bug. Do you remember whether you ever submitted this upstream as Quanah suggested? I haven't found it in the ITS, nor any related discussion on the mailing lists.

If you didn't send your patch upstream, but still wish to, please follow the guidelines for contributing:

   http://www.openldap.org/devel/contributing.html

thank you,
Ryan

Reply via email to