From: Pierangelo Masarati Date: Wed, 17 Nov 2004 17:55:44 +0000 (+0000) Subject: improve diagnostics X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~286 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6eec000889396e10cd9d1d5b1e46c72bec7a84e8;p=openldap improve diagnostics --- diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index 3b71971e74..e991a3a193 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -86,7 +86,7 @@ ldap_back_db_config( /* URI of server to query (preferred over "server" directive) */ } else if ( strcasecmp( argv[0], "uri" ) == 0 ) { LDAPURLDesc *tmpludp; - int urlrc; + int urlrc, i; if ( argc != 2 ) { fprintf( stderr, "%s: line %d: " @@ -152,7 +152,10 @@ ldap_back_db_config( 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 && tmpludp->lud_dn[0] != '\0' ) || tmpludp->lud_attrs != NULL @@ -163,8 +166,8 @@ ldap_back_db_config( "warning, only protocol, " "host and port allowed " "in \"uri \" statement " - "for \"%s\"\n", - fname, lineno, argv[1] ); + "for uri #%d of \"%s\"\n", + fname, lineno, i, argv[1] ); } }