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

Re: redesigning the client API

Volker Lendecke wrote:

On Wed, Dec 01, 2004 at 09:27:49AM -0800, Kurt D. Zeilenga wrote:

Of course, the devil is in the details.


One thing I never really liked is the way the RFC API handles memory. All the different _free routines are a bit confusing to me. Samba4 has a generic memory allocator library along the lines of http://swapped.cc/halloc/. You can hang arbitrary memory to a "parent". When you free the parent, all children are automatically freed. This greatly simplifies Samba4 memory management, I'd *love* to see something like that incorporated, especially as an LDAP PDU can be rather complex in terms of memory.


Sounds interesting, worth a look.

One peeve of mine is to fix the asymmetric parts of the API names -> bind vs unbind for example. There should be a library init/deinit function, maybe a session open/close, and "Unbind" should only send the Unbind request, not do anything else.

 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support