2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2003 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>
32 #ifdef LDAP_EXOP_X_CANCEL
42 BerElement *cancelidber = NULL;
43 struct berval *cancelidvalp = NULL;
46 cancelidber = ber_alloc_t( LBER_USE_DER );
47 ber_printf( cancelidber, "{i}", cancelid );
48 ber_flatten( cancelidber, &cancelidvalp );
49 rc = ldap_extended_operation( ld, LDAP_EXOP_X_CANCEL,
50 cancelidvalp, sctrls, cctrls, msgidp );
51 ber_free( cancelidber, 1 );
60 LDAPControl **cctrls )
62 BerElement *cancelidber = NULL;
63 struct berval *cancelidvalp = NULL;
66 cancelidber = ber_alloc_t( LBER_USE_DER );
67 ber_printf( cancelidber, "{i}", cancelid );
68 ber_flatten( cancelidber, &cancelidvalp );
69 rc = ldap_extended_operation_s( ld, LDAP_EXOP_X_CANCEL,
70 cancelidvalp, sctrls, cctrls, NULL, NULL );
71 ber_free( cancelidber, 1 );
75 #endif /* LDAP_EXOP_X_CANCEL */