ITS#5309: complete the addition of ldap_pvt_thread_pool_setkey_x()

This commit is contained in:
Hallvard Furuseth 2008-01-07 20:04:46 +00:00
parent 8a1f904ed9
commit 4a2cda3cff
3 changed files with 16 additions and 9 deletions

View File

@ -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 ldap_int_thread_pool_setkey
#define ldap_pvt_thread_pool_setkey_x ldap_int_thread_pool_setkey_x
#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
#undef ldap_pvt_thread_pool_setkey_x
#undef ldap_pvt_thread_pool_purgekey
#undef ldap_pvt_thread_pool_context
#undef ldap_pvt_thread_pool_context_reset

View File

@ -1242,16 +1242,19 @@ ldap_pvt_thread_pool_getkey(
}
int
ldap_pvt_thread_pool_setkey(
ldap_pvt_thread_pool_setkey_x(
void *xctx,
void *key,
void *data,
ldap_pvt_thread_pool_keyfree_t *kfree )
ldap_pvt_thread_pool_keyfree_t *kfree,
void **olddatap,
ldap_pvt_thread_pool_keyfree_t **oldkfreep )
{
int rc;
ERROR_IF( !threading_enabled, "ldap_pvt_thread_pool_setkey" );
rc = ldap_int_thread_pool_setkey( xctx, key, data, kfree );
ERROR_IF( rc, "ldap_pvt_thread_pool_setkey" );
ERROR_IF( !threading_enabled, "ldap_pvt_thread_pool_setkey_x" );
rc = ldap_int_thread_pool_setkey_x(
xctx, key, data, kfree, olddatap, oldkfreep );
ERROR_IF( rc, "ldap_pvt_thread_pool_setkey_x" );
return rc;
}

View File

@ -200,9 +200,13 @@ int ldap_pvt_thread_pool_getkey (
return(0);
}
int ldap_pvt_thread_pool_setkey (
void *ctx, void *key, void *data, ldap_pvt_thread_pool_keyfree_t *kfree )
int ldap_pvt_thread_pool_setkey_x (
void *ctx, void *key,
void *data, ldap_pvt_thread_pool_keyfree_t *kfree,
void **olddatap, ldap_pvt_thread_pool_keyfree_t **oldkfreep )
{
if ( olddatap ) *olddatap = NULL;
if ( oldkfreep ) *oldkfreep = 0;
return(0);
}