]> git.sur5r.net Git - openldap/commitdiff
Add scheme check to find_connection
authorKurt Zeilenga <kurt@openldap.org>
Sat, 28 Aug 2004 03:55:02 +0000 (03:55 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 28 Aug 2004 03:55:02 +0000 (03:55 +0000)
libraries/libldap/request.c

index 305dc945dd2b96da3f9bdd898f8b39076983cc9b..ce4673e324220ef3b665629ca83fc25e313148af 100644 (file)
@@ -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;
                        }