From: Hallvard Furuseth Date: Mon, 7 Jan 2008 20:04:46 +0000 (+0000) Subject: ITS#5309: complete the addition of ldap_pvt_thread_pool_setkey_x() X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~250 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4a2cda3cff7e4f7a7d31e96cb763608682c70389;p=openldap ITS#5309: complete the addition of ldap_pvt_thread_pool_setkey_x() --- diff --git a/libraries/libldap_r/ldap_thr_debug.h b/libraries/libldap_r/ldap_thr_debug.h index fa754df71d..a85ef67e5b 100644 --- a/libraries/libldap_r/ldap_thr_debug.h +++ b/libraries/libldap_r/ldap_thr_debug.h @@ -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 diff --git a/libraries/libldap_r/thr_debug.c b/libraries/libldap_r/thr_debug.c index 2d271252bc..36894314d8 100644 --- a/libraries/libldap_r/thr_debug.c +++ b/libraries/libldap_r/thr_debug.c @@ -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; } diff --git a/libraries/libldap_r/thr_stub.c b/libraries/libldap_r/thr_stub.c index 65a18bd0ac..d8f06bee2a 100644 --- a/libraries/libldap_r/thr_stub.c +++ b/libraries/libldap_r/thr_stub.c @@ -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); }