]> git.sur5r.net Git - openldap/commitdiff
ITS#5309: complete the addition of ldap_pvt_thread_pool_setkey_x()
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 7 Jan 2008 20:04:46 +0000 (20:04 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 7 Jan 2008 20:04:46 +0000 (20:04 +0000)
libraries/libldap_r/ldap_thr_debug.h
libraries/libldap_r/thr_debug.c
libraries/libldap_r/thr_stub.c

index fa754df71d459c1c3511f33f76ef345c45c47278..a85ef67e5b1435f9e395397dab8109c94d31c156 100644 (file)
 #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
 #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
index 2d271252bc871766955f9065688462c956bfbad4..36894314d8478db87ad6257f44cd2307522b515f 100644 (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;
 }
 
index 65a18bd0ac1bb919b21b01a78ec3db1fbbd3f4c4..d8f06bee2ab46ffb97ac79b15a78a5bee36fefeb 100644 (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);
 }