2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2004 The OpenLDAP Foundation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
11 * A copy of this license is available in the file LICENSE in the
12 * top-level directory of the distribution or, alternatively, at
13 * <http://www.OpenLDAP.org/license.html>.
17 * LDAPv3 Cancel Operation Request
23 #include <ac/stdlib.h>
25 #include <ac/socket.h>
26 #include <ac/string.h>
40 BerElement *cancelidber = NULL;
41 struct berval *cancelidvalp = NULL;
44 cancelidber = ber_alloc_t( LBER_USE_DER );
45 ber_printf( cancelidber, "{i}", cancelid );
46 ber_flatten( cancelidber, &cancelidvalp );
47 rc = ldap_extended_operation( ld, LDAP_EXOP_X_CANCEL,
48 cancelidvalp, sctrls, cctrls, msgidp );
49 ber_free( cancelidber, 1 );
58 LDAPControl **cctrls )
60 BerElement *cancelidber = NULL;
61 struct berval *cancelidvalp = NULL;
64 cancelidber = ber_alloc_t( LBER_USE_DER );
65 ber_printf( cancelidber, "{i}", cancelid );
66 ber_flatten( cancelidber, &cancelidvalp );
67 rc = ldap_extended_operation_s( ld, LDAP_EXOP_X_CANCEL,
68 cancelidvalp, sctrls, cctrls, NULL, NULL );
69 ber_free( cancelidber, 1 );