mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
rework internal functions - need the parsed list of URIs before massaging; no impact on exposed funcs
This commit is contained in:
parent
d174f6720a
commit
4f5502ef9f
@ -1228,14 +1228,9 @@ ldap_url_duplist (LDAPURLDesc *ludlist)
|
||||
return dest;
|
||||
}
|
||||
|
||||
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 )
|
||||
static int
|
||||
ldap_url_parselist_int (LDAPURLDesc **ludlist, const char *url, const char *sep,
|
||||
int (*url_parse)( const char *, LDAPURLDesc ** ) )
|
||||
{
|
||||
int i, rc;
|
||||
LDAPURLDesc *ludp;
|
||||
@ -1254,7 +1249,7 @@ ldap_url_parselist_ext (LDAPURLDesc **ludlist, const char *url, const char *sep
|
||||
for (i = 0; urls[i] != NULL; i++) ;
|
||||
/* ...and put them in the "stack" backward */
|
||||
while (--i >= 0) {
|
||||
rc = ldap_url_parse( urls[i], &ludp );
|
||||
rc = url_parse( urls[i], &ludp );
|
||||
if ( rc != 0 ) {
|
||||
ldap_charray_free(urls);
|
||||
ldap_free_urllist(*ludlist);
|
||||
@ -1268,6 +1263,18 @@ ldap_url_parselist_ext (LDAPURLDesc **ludlist, const char *url, const char *sep
|
||||
return LDAP_URL_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
ldap_url_parselist (LDAPURLDesc **ludlist, const char *url )
|
||||
{
|
||||
return ldap_url_parselist_int( ludlist, url, ", ", ldap_url_parse );
|
||||
}
|
||||
|
||||
int
|
||||
ldap_url_parselist_ext (LDAPURLDesc **ludlist, const char *url, const char *sep )
|
||||
{
|
||||
return ldap_url_parselist_int( ludlist, url, sep, ldap_url_parse_ext );
|
||||
}
|
||||
|
||||
int
|
||||
ldap_url_parsehosts(
|
||||
LDAPURLDesc **ludlist,
|
||||
|
Loading…
Reference in New Issue
Block a user