Re: Is ldap_abandon_ext needed after ldap_modify_ext, when return code is not LDAP_SUCCESS?

Anton Bobrov <[email protected]>
Newsgroups gmane.comp.mozilla.devel.directory
Organization Sun Microsystems, Inc.
Message-ID <[email protected]>
RamaKrishna Narla wrote:

>>From the SDK source, it seems like the operations like ldap_modify_ext
> may return a positive message ID, even when its return code is not
> LDAP_SUCCESS.

you should check for LDAP_SUCCESS and only then rely on the msgid coz
if the call failed for whatever reason there is no point chasing any
msgid you got back from it.

> In such a scenario:
> 1. Is it recommended to call ldap_abandon_ext on that message ID to
> either free up some allocated resources or for some other reason?

no, there is no meed to call abandon, in scenario you describe your
request has never made it to the server or at lest never made it in
full so there is nothing to abandon.

> 2. Is it unsafe to call ldap_abandon_ext on that message ID as the
> return code from ldap_modify_ext is not LDAP_SUCCESS? If it is unsafe,
> is it because of the chance in assigning same message ID to some other
> request on the same connection handle, which returned LDAP_SUCCESS?

there is a per session / per handle counter that gets incremented on
each operation so you dont risk anything calling abandon there apart
from wasting resources.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.