]> git.sur5r.net Git - openldap/commitdiff
don't perror when not required
authorPierangelo Masarati <ando@openldap.org>
Sat, 5 Nov 2005 12:23:17 +0000 (12:23 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 5 Nov 2005 12:23:17 +0000 (12:23 +0000)
clients/tools/common.c

index 52575ca987955cb9e94572d747d5f7047a662b67..eb6f9869db08aeb76fb8e6d13965400913efc5d4 100644 (file)
@@ -1017,7 +1017,12 @@ tool_bind( LDAP *ld )
                        ldap_controls_free( ctrls );
                }
 
-               if ( err != LDAP_SUCCESS || msgbuf[0] || matched || info || refs ) {
+               if ( err != LDAP_SUCCESS
+                       || msgbuf[0]
+                       || ( matched && matched[ 0 ] )
+                       || ( info && info[ 0 ] )
+                       || refs )
+               {
                        tool_perror( err, msgbuf, matched, info, refs );
 
                        if( matched ) ber_memfree( matched );