mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
rename ldap_pvt_thread_pool_setkey_x() to ldap_pvt_thread_pool_setkey() (as part of ITS#5309)
This commit is contained in:
parent
f763967c48
commit
30f401c628
@ -215,7 +215,7 @@ static int smbk5pwd_op_cleanup(
|
||||
|
||||
/* 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;
|
||||
@ -234,8 +234,8 @@ static int smbk5pwd_op_bind(
|
||||
*/
|
||||
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;
|
||||
|
@ -268,7 +268,7 @@ ldap_pvt_thread_pool_getkey LDAP_P((
|
||||
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,
|
||||
@ -276,9 +276,6 @@ ldap_pvt_thread_pool_setkey_x LDAP_P((
|
||||
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 ));
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
||||
#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
|
||||
@ -182,7 +182,7 @@
|
||||
#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
|
||||
|
@ -1242,7 +1242,7 @@ ldap_pvt_thread_pool_getkey(
|
||||
}
|
||||
|
||||
int
|
||||
ldap_pvt_thread_pool_setkey_x(
|
||||
ldap_pvt_thread_pool_setkey(
|
||||
void *xctx,
|
||||
void *key,
|
||||
void *data,
|
||||
@ -1251,10 +1251,10 @@ ldap_pvt_thread_pool_setkey_x(
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ int ldap_pvt_thread_pool_getkey (
|
||||
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 )
|
||||
|
@ -756,7 +756,7 @@ clear_key_idx( ldap_int_thread_userctx_t *ctx, int i )
|
||||
* 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,
|
||||
|
@ -1449,7 +1449,7 @@ bdb_locker_flush( DB_ENV *env )
|
||||
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 );
|
||||
}
|
||||
}
|
||||
@ -1494,7 +1494,7 @@ bdb_locker_id( Operation *op, DB_ENV *env, BDB_LOCKER *locker )
|
||||
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 );
|
||||
|
@ -1009,7 +1009,7 @@ static void *search_stack( Operation *op )
|
||||
* 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;
|
||||
}
|
||||
|
@ -948,7 +948,8 @@ meta_back_candidates_get( Operation *op )
|
||||
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;
|
||||
|
@ -519,7 +519,7 @@ backsql_get_db_conn( Operation *op, SQLHDBC *dbhp )
|
||||
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;
|
||||
|
@ -822,7 +822,7 @@ be_rootdn_bind( Operation *op, SlapReply *rs )
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
@ -830,7 +830,7 @@ be_rootdn_bind( Operation *op, SlapReply *rs )
|
||||
|
||||
#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 );
|
||||
|
@ -976,7 +976,7 @@ conn_counter_init( Operation *op, void *ctx )
|
||||
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;
|
||||
@ -1953,8 +1953,8 @@ connection_fake_init2(
|
||||
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;
|
||||
|
@ -122,8 +122,8 @@ slap_op_free( Operation *op, void *ctx )
|
||||
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 );
|
||||
}
|
||||
@ -160,8 +160,8 @@ slap_op_alloc(
|
||||
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) {
|
||||
|
@ -204,7 +204,7 @@ memberof_saved_member_get( Operation *op, void *keyp )
|
||||
*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 );
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ memberof_saved_member_set( Operation *op, void *keyp, BerVarray vals )
|
||||
} 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 );
|
||||
|
@ -507,7 +507,7 @@ slap_passwd_check(
|
||||
#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
|
||||
|
||||
@ -527,7 +527,7 @@ slap_passwd_check(
|
||||
|
||||
#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;
|
||||
|
@ -129,7 +129,7 @@ slap_sl_mem_create(
|
||||
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;
|
||||
@ -162,7 +162,7 @@ slap_sl_mem_create(
|
||||
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++) {
|
||||
@ -246,7 +246,7 @@ slap_sl_mem_detach(
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user