]> git.sur5r.net Git - openldap/commitdiff
Eliminate second session protocol version field.
authorKurt Zeilenga <kurt@openldap.org>
Fri, 18 Feb 2000 19:57:38 +0000 (19:57 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 18 Feb 2000 19:57:38 +0000 (19:57 +0000)
libraries/libldap/ldap-int.h
libraries/libldap/open.c
libraries/libldap/options.c

index 9f292a659633860ca07802d41c7828609140551d..0cc4ac0b07cc5c13c87bdcec2377ebbc6f40b51f 100644 (file)
@@ -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;
 
index 1253a3c37f3138b834f0f2e3842b6abe0130c336..349df3808e516614dc38b024237b5834b30395e9 100644 (file)
@@ -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;
index 237609c6f365527162faa13bb10f6070e44919d0..93f95640da0ac06a20c1619ff9dcbffc4d8e5c99 100644 (file)
@@ -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: