]> git.sur5r.net Git - openldap/commitdiff
improve last commit
authorPierangelo Masarati <ando@openldap.org>
Tue, 4 Feb 2003 19:27:56 +0000 (19:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 4 Feb 2003 19:27:56 +0000 (19:27 +0000)
libraries/libldap/ldap-int.h
libraries/libldap/url.c
servers/slapd/back-meta/config.c

index ad517cfa7deb075df0368e0fbb06555c36e08e5d..a769f287af49bc586b475b2ef6f57db525b1b842 100644 (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,
index 788a601f727fde469d52eb7ff89997c05f683930..e5909bac417e7b1905e9e039e17445050e88e901 100644 (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;
 
index 80305f4abac8b637c97f314b267491c6e9d42f8b..4477c2346d4bb42c61e2982a1540c4ba9bfa4120 100644 (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",