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

Re: Define ldap_errno as errno

At 06:07 PM 1/4/00 -0700, Dave Steck wrote:
>According to the draft  "draft-zeilenga-ldap-c-api-errno-00.txt", is it valid to define the context-specific variable ldap_errno as errno if the platform already supports a context-specific errno?

No.  The purpose of ldap_errno is to provide a general
indicatation of type of failure which is operating system
neutral.  Values of errno are quite operating system
specific (though the symbol itself isn't) and indicate
low level faults which may or may not equate to faults
with the higher level LDAP C API.

That is, ldap_errno has the value LDAP_NO_MEMORY (0x5A) while
errno may have the value ENOMEM (0x0c) if the API has a
memory allocation failure.

>The draft says ldap_errno should reflect the last error from a CAPI call, and should not be modified if the CAPI call returns success.  It's not clear to me if the draft intended to allow this #define.

See section 4 of my draft states that "Implementations (of
the extension) MUST provide access to an LDAP error number
(CAPI, Section 9) resulting from the last failed CAPI call
via the symbol ldap_errno."

That is, the intent is to provide access to an LDAP error
number, not a operating system specific value such as
errno or whatever.  [note, the draft does not disallow
an API from also supporting system specific reporting
mechanisms in addition to ldap_errno].

Note also that his is only a personal draft and has not
be discussed or debated (yet) within the IETF LDAPext WG.

Kurt D. Zeilenga		<kurt@boolean.net>
Net Boolean Incorporated	<http://www.boolean.net/>