]> git.sur5r.net Git - openldap/commitdiff
ITS#6214 use the main thread's context so cleanup can occur
authorHoward Chu <hyc@openldap.org>
Wed, 22 Jul 2009 04:39:57 +0000 (04:39 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 22 Jul 2009 04:39:57 +0000 (04:39 +0000)
servers/slapd/slapacl.c
servers/slapd/slapauth.c
servers/slapd/slapschema.c

index cc49b215256d48a07534dbd634c5deedd2d89da9..c02d5db3b14485e012a1b15e8453269746388447 100644 (file)
@@ -73,6 +73,7 @@ slapacl( int argc, char **argv )
        char                    *attr = NULL;
        int                     doclose = 0;
        BackendDB               *bd;
+       void                    *thrctx;
 
        slap_tool_init( progname, SLAPACL, argc, argv );
 
@@ -96,7 +97,8 @@ slapacl( int argc, char **argv )
        argv = &argv[ optind ];
        argc -= optind;
 
-       connection_fake_init( &conn, &opbuf, &conn );
+       thrctx = ldap_pvt_thread_pool_context();
+       connection_fake_init( &conn, &opbuf, thrctx );
        op = &opbuf.ob_op;
        op->o_tmpmemctx = NULL;
 
index e6a1b8916f3904e360e2cd56c6c648c8d3596d77..9b82e7db7079a53c4a9f0a61abc12289be64f9fb 100644 (file)
@@ -83,13 +83,15 @@ slapauth( int argc, char **argv )
        Connection              conn = {0};
        OperationBuffer opbuf;
        Operation               *op;
+       void                    *thrctx;
 
        slap_tool_init( progname, SLAPAUTH, argc, argv );
 
        argv = &argv[ optind ];
        argc -= optind;
 
-       connection_fake_init( &conn, &opbuf, &conn );
+       thrctx = ldap_pvt_thread_pool_context();
+       connection_fake_init( &conn, &opbuf, thrctx );
        op = &opbuf.ob_op;
 
        conn.c_sasl_bind_mech = mech;
index 6a00be85c7e0f5e66660b47a4ecd3964e8a41a50..c3b7aaed88b5247fe4887b75a0c99d5d0c40683a 100644 (file)
@@ -49,6 +49,7 @@ slapschema( int argc, char **argv )
        Connection conn = { 0 };
        OperationBuffer opbuf;
        Operation *op = NULL;
+       void *thrctx;
 
        slap_tool_init( progname, SLAPCAT, argc, argv );
 
@@ -78,7 +79,8 @@ slapschema( int argc, char **argv )
                exit( EXIT_FAILURE );
        }
 
-       connection_fake_init( &conn, &opbuf, &conn );
+       thrctx = ldap_pvt_thread_pool_context();
+       connection_fake_init( &conn, &opbuf, thrctx );
        op = &opbuf.ob_op;
        op->o_tmpmemctx = NULL;
        op->o_bd = be;