From c9dd33b5208310e1ccd2d1ca33a6de7c551cae30 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 28 Aug 2004 03:55:02 +0000 Subject: [PATCH] Add scheme check to find_connection --- libraries/libldap/request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.39.5