Use fake_init2 in db_open/db_close since they can execute from a

back-config operation (and could wipe out the state otherwise)
This commit is contained in:
Howard Chu 2009-11-15 10:38:13 +00:00
parent 68ab1a2272
commit ff98f4abc5
5 changed files with 8 additions and 8 deletions

View File

@ -841,7 +841,7 @@ monitor_search2ndn(
}
thrctx = ldap_pvt_thread_pool_context();
connection_fake_init( &conn, &opbuf, thrctx );
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
op = &opbuf.ob_op;
op->o_tag = LDAP_REQ_SEARCH;

View File

@ -548,7 +548,7 @@ backsql_db_open(
}
/* This should just be to force schema loading */
connection_fake_init( &conn, &opbuf, thrctx );
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
op = &opbuf.ob_op;
op->o_bd = bd;
if ( backsql_get_db_conn( op, &dbh ) != LDAP_SUCCESS ) {

View File

@ -137,7 +137,7 @@ dds_expire( void *ctx, dds_info_t *di )
int rc;
char *extra = "";
connection_fake_init( &conn, &opbuf, ctx );
connection_fake_init2( &conn, &opbuf, ctx, 0 );
op = &opbuf.ob_op;
op->o_tag = LDAP_REQ_SEARCH;
@ -1627,7 +1627,7 @@ dds_count( void *ctx, BackendDB *be )
int rc;
char *extra = "";
connection_fake_init( &conn, &opbuf, ctx );
connection_fake_init2( &conn, &opbuf, ctx, 0 );
op = &opbuf.ob_op;
op->o_tag = LDAP_REQ_SEARCH;

View File

@ -4490,7 +4490,7 @@ pcache_db_open2(
AttributeAssertion ava = ATTRIBUTEASSERTION_INIT;
AttributeName attrs[ 2 ] = {{{ 0 }}};
connection_fake_init( &conn, &opbuf, thrctx );
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
op = &opbuf.ob_op;
op->o_bd = &cm->db;
@ -4676,7 +4676,7 @@ pcache_db_close(
thrctx = ldap_pvt_thread_pool_context();
connection_fake_init( &conn, &opbuf, thrctx );
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
op = &opbuf.ob_op;
if ( qm->templates != NULL ) {

View File

@ -2893,7 +2893,7 @@ syncprov_db_open(
}
thrctx = ldap_pvt_thread_pool_context();
connection_fake_init( &conn, &opbuf, thrctx );
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
op = &opbuf.ob_op;
op->o_bd = be;
op->o_dn = be->be_rootdn;
@ -2978,7 +2978,7 @@ syncprov_db_close(
void *thrctx;
thrctx = ldap_pvt_thread_pool_context();
connection_fake_init( &conn, &opbuf, thrctx );
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
op = &opbuf.ob_op;
op->o_bd = be;
op->o_dn = be->be_rootdn;