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

Re: Why ldap_<first,next>_attribute ?



ldap-c-api seems to invite some misunderstandings.

* Malcolm Boff and Ian Bruce write that ldap_get_attributes() may run
  into memory problems after a very large search response.
  
  ldap_<first/next>_attribute() fetch one *attribute name* from *a
  single directory entry*.  I'm not very worried about out-of-memory
  problems because one entry has 20MB of *attribute names*.

  It's a reasonable misunderstanding.
  Chapter (3) "Overview of the LDAP Model" says

    Entries are composed of
    attributes, which have a type and one or more values. 

  So one might expect those functions to return both type and values.
  Is it too late to rename them to e.g. ldap_<first/next>_attrtype(), or
  maybe those names should be added and the old names deprecated?

* Ian and Marcelo Lang add comments about its network performance.

  ldap_<first/next>_attribute() do not perform network operations.
  They work on data which ldap_<result/search_s> received over the net.

  Maybe the draft should be clearer about which operations do perform
  network operations and which ones work on data on the local machine.
  It talks about "LDAP operations" and "obtaining results", but I guess
  ldap_first_attribute can be seen as an LDAP operation.

-- 
Hallvard