From 6cb60f381afc5c858f894ddfc9537a84e7fc6750 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Feb 2000 19:57:38 +0000 Subject: [PATCH] Eliminate second session protocol version field. --- libraries/libldap/ldap-int.h | 4 ++-- libraries/libldap/open.c | 3 --- libraries/libldap/options.c | 6 +----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index 9f292a6596..0cc4ac0b07 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -99,7 +99,7 @@ struct ldapoptions { struct timeval *ldo_tm_api; struct timeval *ldo_tm_net; - ber_int_t ldo_version; /* version to connect at */ + ber_int_t ldo_version; ber_int_t ldo_deref; ber_int_t ldo_timelimit; ber_int_t ldo_sizelimit; @@ -234,7 +234,7 @@ struct ldap { #define ld_sctrls ld_options.ldo_sctrls #define ld_cctrls ld_options.ldo_cctrls - ber_int_t ld_version; /* version connected at */ +#define ld_version ld_options.ldo_version char *ld_host; int ld_port; diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 1253a3c37f..349df3808e 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -161,9 +161,6 @@ ldap_create( LDAP **ldp ) #endif /* LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET */ #endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */ - /* we'll assume we're talking version 2 for now */ - ld->ld_version = LDAP_VERSION2; - ber_pvt_sb_init( &(ld->ld_sb) ); *ldp = ld; diff --git a/libraries/libldap/options.c b/libraries/libldap/options.c index 237609c6f3..93f95640da 100644 --- a/libraries/libldap/options.c +++ b/libraries/libldap/options.c @@ -198,11 +198,7 @@ ldap_get_option( return LDAP_OPT_SUCCESS; case LDAP_OPT_PROTOCOL_VERSION: - if ((ld != NULL) && ld->ld_version) { - * (int *) outvalue = ld->ld_version; - } else { - * (int *) outvalue = lo->ldo_version; - } + * (int *) outvalue = lo->ldo_version; return LDAP_OPT_SUCCESS; case LDAP_OPT_SERVER_CONTROLS: -- 2.39.5