ITS#6977 fix verbose check in client tools

This commit is contained in:
Howard Chu 2011-06-23 17:10:37 -07:00
parent d0973003f7
commit d76be4828c
4 changed files with 7 additions and 6 deletions

View File

@ -318,7 +318,8 @@ main( int argc, char *argv[] )
}
}
if( verbose || ( code != LDAP_SUCCESS ) || matcheddn || text || refs ) {
if( verbose || code != LDAP_SUCCESS ||
( matcheddn && *matcheddn ) || ( text && *text ) || refs ) {
printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code );
if( text && *text ) {

View File

@ -374,7 +374,7 @@ main( int argc, char *argv[] )
}
if( verbose || code != LDAP_SUCCESS ||
matcheddn || text || refs || ctrls )
( matcheddn && *matcheddn ) || ( text && *text ) || refs || ctrls )
{
printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code );

View File

@ -469,8 +469,8 @@ main( int argc, char *argv[] )
}
skip:
if ( verbose || ( code != LDAP_SUCCESS ) ||
matcheddn || text || refs || ctrls )
if ( verbose || code != LDAP_SUCCESS ||
( matcheddn && *matcheddn ) || ( text && *text ) || refs || ctrls )
{
printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code );

View File

@ -199,8 +199,8 @@ main( int argc, char *argv[] )
skip:
ldap_msgfree(res);
if ( verbose || ( code != LDAP_SUCCESS ) ||
matcheddn || text || refs || ctrls )
if ( verbose || code != LDAP_SUCCESS ||
( matcheddn && *matcheddn ) || ( text && *text ) || refs || ctrls )
{
printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code );