/* clear out the current key */
ldap_pvt_thread_pool_setkey( op->o_threadctx, smbk5pwd_op_cleanup,
- NULL, NULL, NULL, NULL );
+ NULL, 0, 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, NULL, NULL );
+ smbk5pwd_op_cleanup, op, 0, 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;
if ( found ) {
*oldkfreep = ctx->ltu_key[i].ltk_free;
} else {
- *oldkfreep = NULL;
+ *oldkfreep = 0;
}
}
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, NULL, NULL );
+ ldap_pvt_thread_pool_setkey( ctx, env, NULL, 0, NULL, NULL );
bdb_locker_id_free( env, data );
}
}
void *ret = NULL;
if ( op->o_threadctx ) {
- ldap_pvt_thread_pool_getkey( op->o_threadctx, search_stack,
+ ldap_pvt_thread_pool_getkey( op->o_threadctx, (void *)search_stack,
&ret, NULL );
} else {
ret = bdb->bi_search_stack;
ret = ch_malloc( bdb->bi_search_stack_depth * BDB_IDL_UM_SIZE
* sizeof( ID ) );
if ( op->o_threadctx ) {
- ldap_pvt_thread_pool_setkey( op->o_threadctx, search_stack,
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)search_stack,
ret, search_stack_free, NULL, NULL );
} else {
bdb->bi_search_stack = ret;
}
#ifdef SLAPD_SPASSWD
- ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- op->o_conn->c_sasl_authctx, NULL, &old_authctx, NULL );
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,
+ op->o_conn->c_sasl_authctx, 0, &old_authctx, NULL );
#endif
rc = lutil_passwd( &op->o_bd->be_rootpw, &op->orb_cred, NULL, NULL );
#ifdef SLAPD_SPASSWD
- ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- old_authctx, NULL, NULL, NULL );
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,
+ old_authctx, 0, NULL, NULL );
#endif
rc = ( rc == 0 ? LDAP_SUCCESS : LDAP_INVALID_CREDENTIALS );
slap_counters_t *sc;
void *vsc = NULL;
- if ( ldap_pvt_thread_pool_getkey( ctx, conn_counter_init, &vsc, NULL ) || !vsc ) {
+ if ( ldap_pvt_thread_pool_getkey(
+ ctx, (void *)conn_counter_init, &vsc, NULL ) || !vsc ) {
vsc = ch_malloc( sizeof( slap_counters_t ));
sc = vsc;
slap_counters_init( sc );
- ldap_pvt_thread_pool_setkey( ctx, conn_counter_init, vsc,
+ ldap_pvt_thread_pool_setkey( ctx, (void*)conn_counter_init, vsc,
conn_counter_destroy, NULL, NULL );
ldap_pvt_thread_mutex_lock( &slap_counters.sc_mutex );
void *ebx = NULL;
/* Use thread keys to make sure these eventually get cleaned up */
- if ( ldap_pvt_thread_pool_getkey( ctx, connection_fake_init, &ebx,
- NULL )) {
+ if ( ldap_pvt_thread_pool_getkey( ctx, (void *)connection_fake_init,
+ &ebx, NULL )) {
eb = ch_malloc( sizeof( *eb ));
slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn );
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,
+ ldap_pvt_thread_pool_setkey( ctx, (void *)connection_fake_init,
eb, connection_fake_destroy, NULL, NULL );
} else {
eb = ebx;
} else {
ldap_pvt_thread_pool_setkey( op->o_threadctx,
- key, NULL, NULL, &vals, NULL );
+ key, NULL, 0, &vals, NULL );
}
return vals;
#ifdef SLAPD_SPASSWD
void *old_authctx = NULL;
- ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- op->o_conn->c_sasl_authctx, NULL, &old_authctx, NULL );
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,
+ op->o_conn->c_sasl_authctx, 0, &old_authctx, NULL );
#endif
for ( bv = a->a_vals; bv->bv_val != NULL; bv++ ) {
}
#ifdef SLAPD_SPASSWD
- ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- old_authctx, NULL, NULL, NULL );
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,
+ old_authctx, 0, NULL, NULL );
#endif
return result;
rtn = LUTIL_PASSWD_ERR;
ctx = ldap_pvt_thread_pool_context();
- ldap_pvt_thread_pool_getkey( ctx, slap_sasl_bind, &sconn, NULL );
+ ldap_pvt_thread_pool_getkey( ctx, (void *)slap_sasl_bind, &sconn, NULL );
if( sconn != NULL ) {
int sc;
slheap = NULL;
#else
/* separate from context */
- ldap_pvt_thread_pool_setkey( ctx, (void *)slap_sl_mem_init, NULL, NULL, NULL, NULL );
+ ldap_pvt_thread_pool_setkey( ctx, (void *)slap_sl_mem_init,
+ NULL, 0, NULL, NULL );
#endif
}