[Date Prev][Date Next]
Re: struct ldap empty
On Tue, 27 Oct 1998, Stuart Lynne wrote:
> I don't know what other implications there are with adding
> LDAP_OPT_SIZELIMIT (what other Netscapism's are people using it to select?)
> so I havn't attempted to add LDAP_OPT_SIZELIMIT to ldap.h.
This would be IMHO a "bad thing". Since most people who have developed
LDAP programs in the last year used the Howes/Smith book (the only one on
the market at the time), they also use this cpp trick to handle the
differences between Netscape and UMich.
The problem is that the changes are far wider than just how one gets to
certain per-connection variables. Most of the results you get from the
Netscape SDK are dynamically allocated and must be freed, but not in
UMich/OpenLDAP. Specifically, you have to free the BER handle in Netscape
but not in UMich. This is a common bug that causes memory leaks when
porting code from UMich to Netscape.
So, adding LDAP_OPT_SIZELIMIT to OpenLDAP is going to cause things to
break in a big way. Immediately people are going to start seeing
unresolved symbols when their code starts to use Netscape-specific calls
that are not in the OpenLDAP library (ldap_ber_free for example).
I think that OpenLDAP, if it wants to avoid driving developers crazy, is
going to have to walk a thin line between adding features and maintaining
API compatibility with the UMich build. This will be the situation until
somone publishes a book that describes the OpenLDAP API, or until OpenLDAP
changes the internals of the library to match Netscape's semantics. I
would argue that the latter is a better thing, since I've used both and
appreciated the changes that were made at Netscape.
James FitzGibbon email@example.com
System Engineer, ACC Global Net Voice/Fax (416)207-7171/7610