1 /* $OpenLDAP: pkg/ldap/libraries/libldap/cancel.c,v 1.10.2.4 2008/02/11 23:26:41 kurt Exp $ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2008 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>.
16 * This program was originally developed by Kurt D. Zeilenga for inclusion
17 * in OpenLDAP Software.
21 * LDAPv3 Cancel Operation Request
27 #include <ac/stdlib.h>
29 #include <ac/socket.h>
30 #include <ac/string.h>
44 BerElement
*cancelidber
= NULL
;
45 struct berval
*cancelidvalp
= NULL
;
48 cancelidber
= ber_alloc_t( LBER_USE_DER
);
49 ber_printf( cancelidber
, "{i}", cancelid
);
50 ber_flatten( cancelidber
, &cancelidvalp
);
51 rc
= ldap_extended_operation( ld
, LDAP_EXOP_CANCEL
,
52 cancelidvalp
, sctrls
, cctrls
, msgidp
);
53 ber_free( cancelidber
, 1 );
62 LDAPControl
**cctrls
)
64 BerElement
*cancelidber
= NULL
;
65 struct berval
*cancelidvalp
= NULL
;
68 cancelidber
= ber_alloc_t( LBER_USE_DER
);
69 ber_printf( cancelidber
, "{i}", cancelid
);
70 ber_flatten( cancelidber
, &cancelidvalp
);
71 rc
= ldap_extended_operation_s( ld
, LDAP_EXOP_CANCEL
,
72 cancelidvalp
, sctrls
, cctrls
, NULL
, NULL
);
73 ber_free( cancelidber
, 1 );