int *msgidp )
{
BerElement *cancelidber = NULL;
- struct berval *cancelidvalp = NULL;
+ struct berval cancelidvalp = { 0, NULL };
int rc;
cancelidber = ber_alloc_t( LBER_USE_DER );
ber_printf( cancelidber, "{i}", cancelid );
- ber_flatten( cancelidber, &cancelidvalp );
+ ber_flatten2( cancelidber, &cancelidvalp, 0 );
rc = ldap_extended_operation( ld, LDAP_EXOP_CANCEL,
- cancelidvalp, sctrls, cctrls, msgidp );
+ &cancelidvalp, sctrls, cctrls, msgidp );
ber_free( cancelidber, 1 );
return rc;
}
LDAPControl **cctrls )
{
BerElement *cancelidber = NULL;
- struct berval *cancelidvalp = NULL;
+ struct berval cancelidvalp = { 0, NULL };
int rc;
cancelidber = ber_alloc_t( LBER_USE_DER );
ber_printf( cancelidber, "{i}", cancelid );
- ber_flatten( cancelidber, &cancelidvalp );
+ ber_flatten2( cancelidber, &cancelidvalp, 0 );
rc = ldap_extended_operation_s( ld, LDAP_EXOP_CANCEL,
- cancelidvalp, sctrls, cctrls, NULL, NULL );
+ &cancelidvalp, sctrls, cctrls, NULL, NULL );
ber_free( cancelidber, 1 );
return rc;
}