[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_init overwrites ldap version number to 2



At 04:38 AM 2/18/00 -0700, Dave Steck wrote:
>Oops, I didn't have it quite right.  There's two problems dealing with setting options with ld=NULL.

Dave,  I think the problem is having two differnet
versions in a session handle.  The original idea was for
one, ldo_version, to indicate the version requested by
the application and one, ld_version, to indicate the
version currently in use.

However, this is quite problematic, there really should
only be one protocol version in a session handle as there
is only one accessor defined LDAP_OPT_PROTOCOL_VERSION.
Even with two versions, it's still quite difficult,
if not impossible to adequately protect the application
from version mismatches if they change the version
in odd ways... (the specs should likely limit when
LDAP_OPT_PROTOCOL_VERSION can be changed).

So, until such time the API specifications detail API
version handling, I suggest:

ld_version field in the ldap session structure be replaced
with a macro:
	ld_version	ld_options.ldo_version

and reworking codes (init.c, open.c, options.c) here and
there as needed.

Comments?

	Kurt