]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/options.c
Fix off by one bug
[openldap] / libraries / libldap / options.c
index 91a10ed54fcd67e0a154440386512cf7e035e494..041897494dc6c9fa1ae8140e4883b34a69962b0e 100644 (file)
@@ -465,7 +465,8 @@ ldap_set_option(
                        int rc = LDAP_OPT_SUCCESS;
 
                        if(host != NULL) {
-                               rc = ldap_url_parsehosts(&ludlist, host);
+                               rc = ldap_url_parsehosts( &ludlist, host,
+                                       lo->ldo_defport ? lo->ldo_defport : LDAP_PORT );
 
                        } else if(ld == NULL) {
                                /*
@@ -596,14 +597,3 @@ ldap_set_rebind_proc( LDAP *ld, LDAP_REBIND_PROC *rebind_proc)
 {
        return( ldap_set_option( ld, LDAP_OPT_REBIND_PROC, (void *)rebind_proc));
 }
-
-int
-ldap_set_sasl_interact_proc( LDAP *ld, LDAP_SASL_INTERACT_PROC *proc)
-{
-#ifdef HAVE_CYRUS_SASL
-       ld->ld_options.ldo_sasl_interact = proc;
-       return LDAP_OPT_SUCCESS;
-#else
-       return LDAP_OPT_ERROR;
-#endif
-}