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

Re: commit: ldap/libraries/libldap result.c



Hallvard B Furuseth wrote:
> Howard Chu writes:
>> Hallvard B Furuseth wrote:
>>> Do you mean ldap_get_option()?  It generally returns malloced data,

not for integers or so; only for strings and structures, which may be
fine for strings but sounds a waste for fixed size structures.

>>> IIRC.  "undocumented" just means the code has been the documentation,
>>> so I presume a change will break any old code which uses it.
>> Yes to all of the above. But since LDAP_OPT_TIMEOUT was completely
>> unimplemented before, I don't think it really makes any
>> difference. I.e., the option was not in the LDAPv2 API or the LDAPv3
>> draft API, and it never actually did anything. Why would it have ever
>> gotten used?
> 
> Mm.  LDAP_OPT_NETWORK_TIMEOUT was implemented, though.  So the change
> breaks code which uses that option.  And ldap_get_option() of the two
> options should work the same way.
> 
> I too would have preferred if ldap_get_option() did less mallocing
> (since there would be less cleanup required afterwards), but I think the
> right place to fix it would be in the Next Generation API we sometimes
> mumble about.

I think the best solution would be to change the way timeouts are
stored, leave the old API in place (i.e. malloc stuff returned by
ldap_get_option() for LDAP_OPT_*TIMEOUT, and add new LDAP_OPT_X_*TIMEOUT
(call it whatever makes sense) that don't return malloc'ed stuff.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------