Cancels an asynchronous LDAP operation already in progress using LDAP client or server controls. The LDAP Cancel operation should be used instead of the LDAP abandon operation when the client needs to know the results.
#include <ldap.h>int ldap_cancel_ext ( LDAP *ld, int msgid, LDAPControl **serverctrls, LDAPControl **clientctrls, Int *msgidp);
(IN) Points to the handle for the LDAP session.
(IN) Specifies the message ID of the asynchronous LDAP operation to cancel.
(IN) Points to a list of LDAP server controls to use with the abandon operation. Use NULL to specify no server controls.
(IN) Points to an array of LDAPControl structures that list the client controls to use with the abandon operation. Use NULL to specify no client controls.
(OUT) Points to the message ID of the request if the search request succeeds.
0x00 |
LDAP_SUCCESS |
Non-zero |
Failure. For a complete list, see |
0x51 |
LDAP_SERVER_DOWN |
0x53 |
LDAP_ENCODING_ERROR |
0x59 |
LDAP_PARAM_ERROR |
0x5A |
LDAP_NO_MEMORY |
0X76 |
LDAP_CANCELED |
0X77 |
LDAP_CANCEL_NO_SUCH_OPERATION |
0X78 |
LDAP_CANCEL_TOO_LATE |
0X79 |
LDAP_CANCEL_CANNOT_CANCEL |
The msgid parameter must specify a message ID returned by an outstanding asynchronous LDAP operation, such as ldap_search or ldap_modify.
The ldap_cancel_ext function checks to see if the results of the operation have already come in.
If not, it sends an LDAP cancel operation to the LDAP server.
If the results have already come in, the LDAP operation cannot be cancelled.
eDirectory currently does not support any controls to use with a cancel operation.