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

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



Pierangelo Masarati wrote:
Hallvard B Furuseth wrote:
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.

I've restored the malloc behavior for LDAP_OPT_*TIMEOUT. I wasn't too keen on adding new Option flags for retrieving the same setting, so I left that alone.


--
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  Chief Architect, OpenLDAP     http://www.openldap.org/project/