/* clear out the current key */
ldap_pvt_thread_pool_setkey( op->o_threadctx, smbk5pwd_op_cleanup,
- NULL, NULL );
+ NULL, NULL, NULL, NULL );
/* free the callback */
cb = op->o_callback;
*/
if ( op->oq_bind.rb_method == LDAP_AUTH_SIMPLE ) {
slap_callback *cb;
- ldap_pvt_thread_pool_setkey( op->o_threadctx, smbk5pwd_op_cleanup, op,
- NULL );
+ ldap_pvt_thread_pool_setkey( op->o_threadctx,
+ smbk5pwd_op_cleanup, op, NULL, NULL, NULL );
cb = op->o_tmpcalloc( 1, sizeof(slap_callback), op->o_tmpmemctx );
cb->sc_cleanup = smbk5pwd_op_cleanup;
cb->sc_next = op->o_callback;
ldap_pvt_thread_pool_keyfree_t **kfree ));
LDAP_F( int )
-ldap_pvt_thread_pool_setkey_x LDAP_P((
+ldap_pvt_thread_pool_setkey LDAP_P((
void *ctx,
void *key,
void *data,
void **olddatap,
ldap_pvt_thread_pool_keyfree_t **oldkfreep ));
-#define ldap_pvt_thread_pool_setkey( ctx, key, data, kfree ) \
- ldap_pvt_thread_pool_setkey_x( (ctx), (key), (data), (kfree), NULL, NULL )
-
LDAP_F( void )
ldap_pvt_thread_pool_purgekey LDAP_P(( void *key ));
#define ldap_pvt_thread_pool_resume ldap_int_thread_pool_resume
#define ldap_pvt_thread_pool_destroy ldap_int_thread_pool_destroy
#define ldap_pvt_thread_pool_getkey ldap_int_thread_pool_getkey
-#define ldap_pvt_thread_pool_setkey_x ldap_int_thread_pool_setkey_x
+#define ldap_pvt_thread_pool_setkey ldap_int_thread_pool_setkey
#define ldap_pvt_thread_pool_purgekey ldap_int_thread_pool_purgekey
#define ldap_pvt_thread_pool_context ldap_int_thread_pool_context
#define ldap_pvt_thread_pool_context_reset ldap_int_thread_pool_context_reset
#undef ldap_pvt_thread_pool_resume
#undef ldap_pvt_thread_pool_destroy
#undef ldap_pvt_thread_pool_getkey
-#undef ldap_pvt_thread_pool_setkey_x
+#undef ldap_pvt_thread_pool_setkey
#undef ldap_pvt_thread_pool_purgekey
#undef ldap_pvt_thread_pool_context
#undef ldap_pvt_thread_pool_context_reset
}
int
-ldap_pvt_thread_pool_setkey_x(
+ldap_pvt_thread_pool_setkey(
void *xctx,
void *key,
void *data,
ldap_pvt_thread_pool_keyfree_t **oldkfreep )
{
int rc;
- ERROR_IF( !threading_enabled, "ldap_pvt_thread_pool_setkey_x" );
- rc = ldap_int_thread_pool_setkey_x(
+ ERROR_IF( !threading_enabled, "ldap_pvt_thread_pool_setkey" );
+ rc = ldap_int_thread_pool_setkey(
xctx, key, data, kfree, olddatap, oldkfreep );
- ERROR_IF( rc, "ldap_pvt_thread_pool_setkey_x" );
+ ERROR_IF( rc, "ldap_pvt_thread_pool_setkey" );
return rc;
}
return(0);
}
-int ldap_pvt_thread_pool_setkey_x (
+int ldap_pvt_thread_pool_setkey (
void *ctx, void *key,
void *data, ldap_pvt_thread_pool_keyfree_t *kfree,
void **olddatap, ldap_pvt_thread_pool_keyfree_t **oldkfreep )
* responsibility to free any existing data with the same key.
* kfree() must not call functions taking a tpool argument.
*/
-int ldap_pvt_thread_pool_setkey_x(
+int ldap_pvt_thread_pool_setkey(
void *xctx,
void *key,
void *data,
void *ctx = ldap_pvt_thread_pool_context();
if ( !ldap_pvt_thread_pool_getkey( ctx, env, &data, NULL ) ) {
- ldap_pvt_thread_pool_setkey( ctx, env, NULL, NULL );
+ ldap_pvt_thread_pool_setkey( ctx, env, NULL, NULL, NULL, NULL );
bdb_locker_id_free( env, data );
}
}
data = (void *)((long)lockid);
#endif
if ( ( rc = ldap_pvt_thread_pool_setkey( ctx, env,
- data, bdb_locker_id_free ) ) ) {
+ data, bdb_locker_id_free, NULL, NULL ) ) ) {
XLOCK_ID_FREE( env, lockid );
Debug( LDAP_DEBUG_ANY, "bdb_locker_id: err %s(%d)\n",
db_strerror(rc), rc, 0 );
* sizeof( ID ) );
if ( op->o_threadctx ) {
ldap_pvt_thread_pool_setkey( op->o_threadctx, search_stack,
- ret, search_stack_free );
+ ret, search_stack_free, NULL, NULL );
} else {
bdb->bi_search_stack = ret;
}
data = (void *)mc;
ldap_pvt_thread_pool_setkey( op->o_threadctx,
&meta_back_candidates_dummy, data,
- meta_back_candidates_keyfree );
+ meta_back_candidates_keyfree,
+ NULL, NULL );
} else {
mi->mi_candidates = mc;
data = (void *)dbh;
ldap_pvt_thread_pool_setkey( op->o_threadctx,
&backsql_db_conn_dummy, data,
- backsql_db_conn_keyfree );
+ backsql_db_conn_keyfree, NULL, NULL );
} else {
bi->sql_dbh = dbh;
}
#ifdef SLAPD_SPASSWD
- ldap_pvt_thread_pool_setkey_x( op->o_threadctx, slap_sasl_bind,
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
op->o_conn->c_sasl_authctx, NULL, &old_authctx, NULL );
#endif
#ifdef SLAPD_SPASSWD
ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- old_authctx, NULL );
+ old_authctx, NULL, NULL, NULL );
#endif
rc = ( rc == 0 ? LDAP_SUCCESS : LDAP_INVALID_CREDENTIALS );
sc = vsc;
slap_counters_init( sc );
ldap_pvt_thread_pool_setkey( ctx, conn_counter_init, vsc,
- conn_counter_destroy );
+ conn_counter_destroy, NULL, NULL );
ldap_pvt_thread_mutex_lock( &slap_counters.sc_mutex );
sc->sc_next = slap_counters.sc_next;
slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op );
eb->eb_conn = conn->c_extensions;
eb->eb_op = op->o_hdr->oh_extensions;
- ldap_pvt_thread_pool_setkey( ctx, connection_fake_init, eb,
- connection_fake_destroy );
+ ldap_pvt_thread_pool_setkey( ctx, connection_fake_init,
+ eb, connection_fake_destroy, NULL, NULL );
} else {
eb = ebx;
conn->c_extensions = eb->eb_conn;
ldap_pvt_thread_pool_getkey( ctx, (void *)slap_op_free, &otmp, NULL );
op2 = otmp;
LDAP_STAILQ_NEXT( op, o_next ) = op2;
- ldap_pvt_thread_pool_setkey( ctx, (void *)slap_op_free, (void *)op,
- slap_op_q_destroy );
+ ldap_pvt_thread_pool_setkey( ctx, (void *)slap_op_free,
+ (void *)op, slap_op_q_destroy, NULL, NULL );
} else {
ber_memfree_x( op, NULL );
}
if ( otmp ) {
op = otmp;
otmp = LDAP_STAILQ_NEXT( op, o_next );
- ldap_pvt_thread_pool_setkey( ctx, (void *)slap_op_free, otmp,
- slap_op_q_destroy );
+ ldap_pvt_thread_pool_setkey( ctx, (void *)slap_op_free,
+ otmp, slap_op_q_destroy, NULL, NULL );
}
}
if (!op) {
*key = NULL;
} else {
- ldap_pvt_thread_pool_setkey_x( op->o_threadctx,
+ ldap_pvt_thread_pool_setkey( op->o_threadctx,
key, NULL, NULL, &vals, NULL );
}
} else {
void *old_vals = NULL;
- ldap_pvt_thread_pool_setkey_x( op->o_threadctx, key,
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, key,
saved_vals, memberof_saved_member_free, &old_vals, NULL );
if ( old_vals != NULL ) {
ber_bvarray_free( old_vals );
#ifdef SLAPD_SPASSWD
void *old_authctx = NULL;
- ldap_pvt_thread_pool_setkey_x( op->o_threadctx, slap_sasl_bind,
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
op->o_conn->c_sasl_authctx, NULL, &old_authctx, NULL );
#endif
#ifdef SLAPD_SPASSWD
ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- old_authctx, NULL );
+ old_authctx, NULL, NULL, NULL );
#endif
return result;
slheap = sh;
#else
ldap_pvt_thread_pool_setkey(ctx, (void *)slap_sl_mem_init,
- (void *)sh, slap_sl_mem_destroy);
+ (void *)sh, slap_sl_mem_destroy, NULL, NULL);
#endif
} else if ( size > (char *)sh->sh_end - (char *)sh->sh_base ) {
void *newptr;
slheap = sh;
#else
ldap_pvt_thread_pool_setkey(ctx, (void *)slap_sl_mem_init,
- (void *)sh, slap_sl_mem_destroy);
+ (void *)sh, slap_sl_mem_destroy, NULL, NULL);
#endif
} else {
for (i = 0; i <= sh->sh_maxorder - order_start; i++) {
slheap = NULL;
#else
/* separate from context */
- ldap_pvt_thread_pool_setkey( ctx, (void *)slap_sl_mem_init, NULL, NULL );
+ ldap_pvt_thread_pool_setkey( ctx, (void *)slap_sl_mem_init, NULL, NULL, NULL, NULL );
#endif
}