]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapmodrdn.c
Add -H to usage
[openldap] / clients / tools / ldapmodrdn.c
index 8782d1c077e7ba5d2a31861ed8ff0693a8005a2c..066ebfd6dc805436b5bddd50e55a4be1905341a3 100644 (file)
@@ -77,6 +77,7 @@ usage( const char *s )
 "  -D binddn  bind DN\n"
 "  -f file    read operations from `file'\n"
 "  -h host    LDAP server\n"
+"  -H URI     LDAP Uniform Resource Indentifier(s)\n"
 "  -I         use SASL Interactive mode\n"
 "  -k         use Kerberos authentication\n"
 "  -K         like -k, but do only step 1 of the Kerberos bind\n"
@@ -551,8 +552,9 @@ main(int argc, char **argv)
                (void) ldap_initialize( &ld, ldapuri );
        }
 
-       if( ld != NULL ) {
-               fprintf( stderr, "Could not create LDAP session handle (%d): %s\n", rc );
+       if( ld == NULL ) {
+               fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
+                       rc, ldap_err2string(rc) );
                return EXIT_FAILURE;
        }