[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-ldap-dev
Subject:    Re: resultCode vs API error code (Was: Testing successful bind)
From:       "Kurt D. Zeilenga" <Kurt () OpenLDAP ! org>
Date:       2000-06-12 14:59:52
[Download RAW message or body]

At 03:46 PM 6/12/00 +0100, Graham Barr wrote:
>> You might consider using the value -1 instead of LDAP_LOCAL_ERROR
>> for this purpose.  A server (incorrectly) could (and, IIRC, have)
>> returned the localError code.  The "liberal in what you accept,
>> strict in what you produce rule" suggests the API should be able
>> to handle this as any other unknown or unrecognized result code.
>> It's my view that APIs should pass result codes through to the
>> application as the API may not be aware of the extension (extended
>> op/control) in use which caused the unrecognized (or unknown) result
>> code to be produced in the first place.  Of course, applications
>> should treat any unrecognized result code as an unknown error.
>
>Hm, good point. Given that protocol error codes are non-negative.

One minor clarification.  A really broken server could return
a negative value inside the PDU resultCode INTEGER.  I suggest
that this should be treated as you would any other API detected
protocol error.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic