ldap_abandon()--Abandon an LDAP Operation in Progress




Syntax

#include <ldap.h>
 
int ldap_abandon(
       LDAP            *ld,
       int             msgid)




Threadsafe: Yes

The ldap_abandon() function is used to abandon or cancel an LDAP operation in progress. The msgid passed should be the message id of an outstanding LDAP operation, as returned by a call to an asynchronous LDAP operation such as ldap_search(), ldap_modify(), etc.

The ldap_abandon() APIs check to see if the result of the operation has already been returned by the server. If it has, it deletes it from the queue of pending messages. If not, it sends an LDAP abandon operation to the the LDAP server.

The caller can expect that the result of an abandoned operation will not be returned from a future call to ldap_result().

Authorities and Locks

No OS/400 authority is required. All authority checking is done by the LDAP server.

Parameters

ld
(Input) Specifies the LDAP pointer returned by a previous call to ldap_init(),ldap_ssl_init(), or ldap_open().

msgid
(Input) The message ID of an outstanding LDAP operation, as returned by a call to an asynchronous LDAP operation such as ldap_search() and ldap_modify(), etc.

Return Value

LDAP_SUCCESS
if the request was successful.
-1
if the request was not successful.

Error Conditions

If ldap_abandon() is not successful, ld_errno will be set to indicate the error. See LDAP Client API Error Conditions for possible LDAP error codes values. ldap_get_errno() function to retrieve the error information.

Error Messages

    The following message may be set from this function.
    CPF3CF2 E  Error(s) occurred during running of ldap_abandon API.

Related Information

    ldap_abandon_ext() -- Abandon (abort) an asynchronous operation with controls.


Top | LDAP APIs List
APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]