mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
improve diagnostics
This commit is contained in:
parent
dd18c8b2a4
commit
6eec000889
@ -86,7 +86,7 @@ ldap_back_db_config(
|
|||||||
/* URI of server to query (preferred over "server" directive) */
|
/* URI of server to query (preferred over "server" directive) */
|
||||||
} else if ( strcasecmp( argv[0], "uri" ) == 0 ) {
|
} else if ( strcasecmp( argv[0], "uri" ) == 0 ) {
|
||||||
LDAPURLDesc *tmpludp;
|
LDAPURLDesc *tmpludp;
|
||||||
int urlrc;
|
int urlrc, i;
|
||||||
|
|
||||||
if ( argc != 2 ) {
|
if ( argc != 2 ) {
|
||||||
fprintf( stderr, "%s: line %d: "
|
fprintf( stderr, "%s: line %d: "
|
||||||
@ -152,7 +152,10 @@ ldap_back_db_config(
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( tmpludp = li->lud; tmpludp; tmpludp = tmpludp->lud_next ) {
|
for ( i = 0, tmpludp = li->lud;
|
||||||
|
tmpludp;
|
||||||
|
i++, tmpludp = tmpludp->lud_next )
|
||||||
|
{
|
||||||
if ( ( tmpludp->lud_dn != NULL
|
if ( ( tmpludp->lud_dn != NULL
|
||||||
&& tmpludp->lud_dn[0] != '\0' )
|
&& tmpludp->lud_dn[0] != '\0' )
|
||||||
|| tmpludp->lud_attrs != NULL
|
|| tmpludp->lud_attrs != NULL
|
||||||
@ -163,8 +166,8 @@ ldap_back_db_config(
|
|||||||
"warning, only protocol, "
|
"warning, only protocol, "
|
||||||
"host and port allowed "
|
"host and port allowed "
|
||||||
"in \"uri <uri>\" statement "
|
"in \"uri <uri>\" statement "
|
||||||
"for \"%s\"\n",
|
"for uri #%d of \"%s\"\n",
|
||||||
fname, lineno, argv[1] );
|
fname, lineno, i, argv[1] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user