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

Re: library questions: LDAPMessage, msgid, ...



Paul Jarc writes:
>Hallvard B Furuseth <h.b.furuseth@usit.uio.no> wrote:
>> msgid is just a 32-bit integer.
> 
> So is a file descriptor, yet it identifies a resource that should be
> destroyed at the appropriate time.  I figured msgid is similar: any
> particular integer value is not meaningful as a msgid until is it
> returned by some asynchronous operation; after that, it refers to some
> LDAPMessage that can can be retrieved by ldap_result().

Good point.

But if you go the other way too and only destroy a msgid after receiving
the corresponding message, remember that there are times when the
corresponding message may never arrive: If you abandon an operation, the
operation may or may not return a result.  Someone has also invented a
'cancel' extended operation, which is like abandon except it returns a
result which says whether or not the operation was abandoned.  If you do
a bind when operations are outstanding on the connection, you should
never receive responses to operations that are still outstanding when
you receive the bind response.  I'm not quite sure if I would trust
that, though.  And I think something similar happens when you close (or
open?) a TLS connection, but I don't quite remember.  Finally, of course
after unbind you won't receive any responses.

-- 
Hallvard