mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-06 15:00:40 +08:00
ITS#9596 Let libldap keep explicit port 0 as that
This commit is contained in:
parent
e96bfd088e
commit
e3905c9898
@ -940,6 +940,7 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp, unsigned flags
|
||||
q = strchr( url, ':' );
|
||||
}
|
||||
|
||||
i = !q; /* i is set iff we don't have a port specified */
|
||||
if ( q != NULL ) {
|
||||
char *next;
|
||||
|
||||
@ -968,7 +969,7 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp, unsigned flags
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( flags & LDAP_PVT_URL_PARSE_DEF_PORT ) && ludp->lud_port == 0 ) {
|
||||
if ( ( flags & LDAP_PVT_URL_PARSE_DEF_PORT ) && i ) {
|
||||
if ( strcmp( ludp->lud_scheme, "ldaps" ) == 0 ) {
|
||||
ludp->lud_port = LDAPS_PORT;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user