]> git.sur5r.net Git - openldap/commitdiff
rename ldap_pvt_thread_pool_setkey_x() to ldap_pvt_thread_pool_setkey() (as part...
authorPierangelo Masarati <ando@openldap.org>
Mon, 7 Jan 2008 21:35:03 +0000 (21:35 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 7 Jan 2008 21:35:03 +0000 (21:35 +0000)
16 files changed:
contrib/slapd-modules/smbk5pwd/smbk5pwd.c
include/ldap_pvt_thread.h
libraries/libldap_r/ldap_thr_debug.h
libraries/libldap_r/thr_debug.c
libraries/libldap_r/thr_stub.c
libraries/libldap_r/tpool.c
servers/slapd/back-bdb/cache.c
servers/slapd/back-bdb/search.c
servers/slapd/back-meta/conn.c
servers/slapd/back-sql/sql-wrap.c
servers/slapd/backend.c
servers/slapd/connection.c
servers/slapd/operation.c
servers/slapd/overlays/memberof.c
servers/slapd/passwd.c
servers/slapd/sl_malloc.c

index 78bc1daec6af6d251207a8f34171e1aa6b98166c..85a6260d5758e5bf3dad26d0bbe3a9900d26932e 100644 (file)
@@ -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;
index e8a8b08dbfd777a4f1d029b417816bb9a592c85d..9036abe0aa9dc30bb65f42533181164ce6e92916 100644 (file)
@@ -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 ));
 
index a85ef67e5b1435f9e395397dab8109c94d31c156..b43d32ee6cf35aff1fff0a073b6b6dfcd39880a4 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_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
 #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
index 36894314d8478db87ad6257f44cd2307522b515f..8ff9fbb3ae690b9b9673aa3854bd6f9fe5d1622f 100644 (file)
@@ -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;
 }
 
index d8f06bee2ab46ffb97ac79b15a78a5bee36fefeb..ad4eea3f57f1331858849b6636b68b792438ea90 100644 (file)
@@ -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 )
index 3b7abee8a7cb9e81cfe46f363dd143582b0d74a3..842f1b260ee7321b9a21b76b0f070d8656e323a7 100644 (file)
@@ -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,
index d666364e1dfe39efd82ba779d03db5ae8d150df0..9fad593d9fa75dfecdbc507fe1aab03a5c861acf 100644 (file)
@@ -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 );
index d2222d87c98154431182546ed5166a0462358279..77ffb61affdc0a2ff586108642bb235a77005512 100644 (file)
@@ -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;
                }
index eba59e52bd043c4b25d69e949199d380d3c82ec3..fbc4ee1708a2c2554ccecfbb24c14e89ba12fe3a 100644 (file)
@@ -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;
index 5e40dc2a7bea1d92968b2e37977f61705b4e9246..053dd17839d937c686c380dc8dce49de2cc6aee1 100644 (file)
@@ -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;
index e29d2ba8b881baad99e4286c57142b96a3ffa8e9..4325b568af7bf8c1d3c5409f5fe91f377457a8ab 100644 (file)
@@ -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 );
index 957662fde75bcd0d98cbf263d9f2c70ab6db3850..33b565c95e1faf089233b33e1bd69fafa57acbb8 100644 (file)
@@ -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;
index 124a3b85b90b8d2060f9c593fee4216f8b987172..96eeab4bf47c3562812aaa508c3dafd96a2192e0 100644 (file)
@@ -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) {
index 064024b1be6d405363b7eade404c8d807890deaf..8915661ef62c33d821e1480db2c4ccb41bb809d5 100644 (file)
@@ -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 );
index a722ef9d7c91753e3070ca1c0ef48cfd729a3fe6..8d2b657ea5aef2738bd0f27e6c95666b4271d6b0 100644 (file)
@@ -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;
index 4feab16e2b2438f02943fe1a892db05ece729aa9..0adb1133df48d5812370489f1ac05b23b4f31132 100644 (file)
@@ -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
 }