From: Kurt Zeilenga Date: Sat, 28 Aug 2004 03:55:02 +0000 (+0000) Subject: Add scheme check to find_connection X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~610 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c9dd33b5208310e1ccd2d1ca33a6de7c551cae30;p=openldap Add scheme check to find_connection --- diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 305dc945dd..ce4673e324 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -459,10 +459,12 @@ find_connection( LDAP *ld, LDAPURLDesc *srv, int any ) lsu_port = ldap_pvt_url_scheme_port( lsu->lud_scheme, lsu->lud_port ); - if ( lcu->lud_host != NULL && *lcu->lud_host != '\0' + if ( strcmp( lcu->lud_scheme, lsu_scheme ) + && lcu->lud_host != NULL && *lcu->lud_host != '\0' && lsu->lud_host != NULL && *lsu->lud_host != '\0' && strcasecmp( lsu->lud_host, lcu->lud_host ) == 0 - && lsu_port == lcu_port ) { + && lsu_port == lcu_port ) + { return lc; }