improve last commit

This commit is contained in:
Pierangelo Masarati 2003-02-04 19:27:56 +00:00
parent c432154ad1
commit e5a1418756
3 changed files with 13 additions and 2 deletions

View file

@ -511,6 +511,11 @@ LDAP_F (int) ldap_url_parselist LDAP_P((
LDAPURLDesc **ludlist,
const char *url ));
LDAP_F (int) ldap_url_parselist_ext LDAP_P((
LDAPURLDesc **ludlist,
const char *url,
const char *sep ));
LDAP_F (int) ldap_url_parsehosts LDAP_P((
LDAPURLDesc **ludlist,
const char *hosts,

View file

@ -880,6 +880,12 @@ ldap_url_duplist (LDAPURLDesc *ludlist)
int
ldap_url_parselist (LDAPURLDesc **ludlist, const char *url )
{
return ldap_url_parselist_ext( ludlist, url, ", " );
}
int
ldap_url_parselist_ext (LDAPURLDesc **ludlist, const char *url, const char *sep )
{
int i, rc;
LDAPURLDesc *ludp;
@ -890,7 +896,7 @@ ldap_url_parselist (LDAPURLDesc **ludlist, const char *url )
*ludlist = NULL;
urls = ldap_str2charray(url, ", ");
urls = ldap_str2charray(url, sep);
if (urls == NULL)
return LDAP_NO_MEMORY;

View file

@ -157,7 +157,7 @@ meta_back_db_config(
/*
* uri MUST be legal!
*/
if ( ldap_url_parselist( &ludp, argv[ 1 ] ) != LDAP_SUCCESS ) {
if ( ldap_url_parselist_ext( &ludp, argv[ 1 ], "\t" ) != LDAP_SUCCESS ) {
fprintf( stderr,
"%s: line %d: unable to parse URI"
" in \"uri <protocol>://<server>[:port]/<naming context>\" line\n",